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-terratec.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-terratec.c')
-rw-r--r-- | drivers/media/radio/radio-terratec.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/media/radio/radio-terratec.c b/drivers/media/radio/radio-terratec.c index a9914dbcf493..3a67471f999c 100644 --- a/drivers/media/radio/radio-terratec.c +++ b/drivers/media/radio/radio-terratec.c | |||
@@ -367,12 +367,7 @@ static const struct file_operations terratec_fops = { | |||
367 | .llseek = no_llseek, | 367 | .llseek = no_llseek, |
368 | }; | 368 | }; |
369 | 369 | ||
370 | static struct video_device terratec_radio= | 370 | static const struct v4l2_ioctl_ops terratec_ioctl_ops = { |
371 | { | ||
372 | .owner = THIS_MODULE, | ||
373 | .name = "TerraTec ActiveRadio", | ||
374 | .type = VID_TYPE_TUNER, | ||
375 | .fops = &terratec_fops, | ||
376 | .vidioc_querycap = vidioc_querycap, | 371 | .vidioc_querycap = vidioc_querycap, |
377 | .vidioc_g_tuner = vidioc_g_tuner, | 372 | .vidioc_g_tuner = vidioc_g_tuner, |
378 | .vidioc_s_tuner = vidioc_s_tuner, | 373 | .vidioc_s_tuner = vidioc_s_tuner, |
@@ -387,6 +382,14 @@ static struct video_device terratec_radio= | |||
387 | .vidioc_s_input = vidioc_s_input, | 382 | .vidioc_s_input = vidioc_s_input, |
388 | }; | 383 | }; |
389 | 384 | ||
385 | static struct video_device terratec_radio = { | ||
386 | .owner = THIS_MODULE, | ||
387 | .name = "TerraTec ActiveRadio", | ||
388 | .type = VID_TYPE_TUNER, | ||
389 | .fops = &terratec_fops, | ||
390 | .ioctl_ops = &terratec_ioctl_ops, | ||
391 | }; | ||
392 | |||
390 | static int __init terratec_init(void) | 393 | static int __init terratec_init(void) |
391 | { | 394 | { |
392 | if(io==-1) | 395 | if(io==-1) |