diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-21 01:57:38 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-26 11:54:58 -0400 |
commit | a399810ca69d9d4bd30ab8c1678c7439e567f90b (patch) | |
tree | 32939ef77bc75c3a224d37cf4e885d7f808741bf /drivers/media/radio/radio-trust.c | |
parent | b654fcdc0ea3b6e5724c9873ae062bdfe7f28efe (diff) |
V4L/DVB (8482): videodev: move all ioctl callbacks to a new v4l2_ioctl_ops struct
All ioctl callbacks are now stored in a new v4l2_ioctl_ops struct. Drivers fill in
a const struct v4l2_ioctl_ops and video_device just contains a const pointer to it.
This ensures a clean separation between the const ops struct and the non-const
video_device struct.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/radio/radio-trust.c')
-rw-r--r-- | drivers/media/radio/radio-trust.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/media/radio/radio-trust.c b/drivers/media/radio/radio-trust.c index 560c49481a2d..e33400180915 100644 --- a/drivers/media/radio/radio-trust.c +++ b/drivers/media/radio/radio-trust.c | |||
@@ -347,12 +347,7 @@ static const struct file_operations trust_fops = { | |||
347 | .llseek = no_llseek, | 347 | .llseek = no_llseek, |
348 | }; | 348 | }; |
349 | 349 | ||
350 | static struct video_device trust_radio= | 350 | static const struct v4l2_ioctl_ops trust_ioctl_ops = { |
351 | { | ||
352 | .owner = THIS_MODULE, | ||
353 | .name = "Trust FM Radio", | ||
354 | .type = VID_TYPE_TUNER, | ||
355 | .fops = &trust_fops, | ||
356 | .vidioc_querycap = vidioc_querycap, | 351 | .vidioc_querycap = vidioc_querycap, |
357 | .vidioc_g_tuner = vidioc_g_tuner, | 352 | .vidioc_g_tuner = vidioc_g_tuner, |
358 | .vidioc_s_tuner = vidioc_s_tuner, | 353 | .vidioc_s_tuner = vidioc_s_tuner, |
@@ -367,6 +362,14 @@ static struct video_device trust_radio= | |||
367 | .vidioc_s_input = vidioc_s_input, | 362 | .vidioc_s_input = vidioc_s_input, |
368 | }; | 363 | }; |
369 | 364 | ||
365 | static struct video_device trust_radio = { | ||
366 | .owner = THIS_MODULE, | ||
367 | .name = "Trust FM Radio", | ||
368 | .type = VID_TYPE_TUNER, | ||
369 | .fops = &trust_fops, | ||
370 | .ioctl_ops = &trust_ioctl_ops, | ||
371 | }; | ||
372 | |||
370 | static int __init trust_init(void) | 373 | static int __init trust_init(void) |
371 | { | 374 | { |
372 | if(io == -1) { | 375 | if(io == -1) { |