diff options
-rw-r--r-- | drivers/media/radio/radio-maxiradio.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-sf16fmr2.c | 2 | ||||
-rw-r--r-- | include/sound/tea575x-tuner.h | 3 | ||||
-rw-r--r-- | sound/i2c/other/tea575x-tuner.c | 7 | ||||
-rw-r--r-- | sound/pci/es1968.c | 2 | ||||
-rw-r--r-- | sound/pci/fm801.c | 4 |
6 files changed, 11 insertions, 9 deletions
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index 740a3d5520c7..b415211d0c4b 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c | |||
@@ -157,7 +157,7 @@ static int __devinit maxiradio_probe(struct pci_dev *pdev, const struct pci_devi | |||
157 | goto err_out_free_region; | 157 | goto err_out_free_region; |
158 | 158 | ||
159 | dev->io = pci_resource_start(pdev, 0); | 159 | dev->io = pci_resource_start(pdev, 0); |
160 | if (snd_tea575x_init(&dev->tea)) { | 160 | if (snd_tea575x_init(&dev->tea, THIS_MODULE)) { |
161 | printk(KERN_ERR "radio-maxiradio: Unable to detect TEA575x tuner\n"); | 161 | printk(KERN_ERR "radio-maxiradio: Unable to detect TEA575x tuner\n"); |
162 | goto err_out_free_region; | 162 | goto err_out_free_region; |
163 | } | 163 | } |
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c index 52b8011f1b23..4efcbec74c52 100644 --- a/drivers/media/radio/radio-sf16fmr2.c +++ b/drivers/media/radio/radio-sf16fmr2.c | |||
@@ -238,7 +238,7 @@ static int __devinit fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io) | |||
238 | snprintf(fmr2->tea.bus_info, sizeof(fmr2->tea.bus_info), "%s:%s", | 238 | snprintf(fmr2->tea.bus_info, sizeof(fmr2->tea.bus_info), "%s:%s", |
239 | fmr2->is_fmd2 ? "PnP" : "ISA", dev_name(pdev)); | 239 | fmr2->is_fmd2 ? "PnP" : "ISA", dev_name(pdev)); |
240 | 240 | ||
241 | if (snd_tea575x_init(&fmr2->tea)) { | 241 | if (snd_tea575x_init(&fmr2->tea, THIS_MODULE)) { |
242 | printk(KERN_ERR "radio-sf16fmr2: Unable to detect TEA575x tuner\n"); | 242 | printk(KERN_ERR "radio-sf16fmr2: Unable to detect TEA575x tuner\n"); |
243 | release_region(fmr2->io, 2); | 243 | release_region(fmr2->io, 2); |
244 | return -ENODEV; | 244 | return -ENODEV; |
diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h index ec3f910aa40b..0c3c2fb0f939 100644 --- a/include/sound/tea575x-tuner.h +++ b/include/sound/tea575x-tuner.h | |||
@@ -44,6 +44,7 @@ struct snd_tea575x_ops { | |||
44 | 44 | ||
45 | struct snd_tea575x { | 45 | struct snd_tea575x { |
46 | struct v4l2_device *v4l2_dev; | 46 | struct v4l2_device *v4l2_dev; |
47 | struct v4l2_file_operations fops; | ||
47 | struct video_device vd; /* video device */ | 48 | struct video_device vd; /* video device */ |
48 | int radio_nr; /* radio_nr */ | 49 | int radio_nr; /* radio_nr */ |
49 | bool tea5759; /* 5759 chip is present */ | 50 | bool tea5759; /* 5759 chip is present */ |
@@ -62,7 +63,7 @@ struct snd_tea575x { | |||
62 | int (*ext_init)(struct snd_tea575x *tea); | 63 | int (*ext_init)(struct snd_tea575x *tea); |
63 | }; | 64 | }; |
64 | 65 | ||
65 | int snd_tea575x_init(struct snd_tea575x *tea); | 66 | int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner); |
66 | void snd_tea575x_exit(struct snd_tea575x *tea); | 67 | void snd_tea575x_exit(struct snd_tea575x *tea); |
67 | 68 | ||
68 | #endif /* __SOUND_TEA575X_TUNER_H */ | 69 | #endif /* __SOUND_TEA575X_TUNER_H */ |
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index aa9900dff6e9..ac62ee791a60 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c | |||
@@ -317,7 +317,6 @@ static int tea575x_s_ctrl(struct v4l2_ctrl *ctrl) | |||
317 | } | 317 | } |
318 | 318 | ||
319 | static const struct v4l2_file_operations tea575x_fops = { | 319 | static const struct v4l2_file_operations tea575x_fops = { |
320 | .owner = THIS_MODULE, | ||
321 | .unlocked_ioctl = video_ioctl2, | 320 | .unlocked_ioctl = video_ioctl2, |
322 | .open = v4l2_fh_open, | 321 | .open = v4l2_fh_open, |
323 | .release = v4l2_fh_release, | 322 | .release = v4l2_fh_release, |
@@ -337,7 +336,6 @@ static const struct v4l2_ioctl_ops tea575x_ioctl_ops = { | |||
337 | }; | 336 | }; |
338 | 337 | ||
339 | static const struct video_device tea575x_radio = { | 338 | static const struct video_device tea575x_radio = { |
340 | .fops = &tea575x_fops, | ||
341 | .ioctl_ops = &tea575x_ioctl_ops, | 339 | .ioctl_ops = &tea575x_ioctl_ops, |
342 | .release = video_device_release_empty, | 340 | .release = video_device_release_empty, |
343 | }; | 341 | }; |
@@ -349,7 +347,7 @@ static const struct v4l2_ctrl_ops tea575x_ctrl_ops = { | |||
349 | /* | 347 | /* |
350 | * initialize all the tea575x chips | 348 | * initialize all the tea575x chips |
351 | */ | 349 | */ |
352 | int snd_tea575x_init(struct snd_tea575x *tea) | 350 | int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner) |
353 | { | 351 | { |
354 | int retval; | 352 | int retval; |
355 | 353 | ||
@@ -374,6 +372,9 @@ int snd_tea575x_init(struct snd_tea575x *tea) | |||
374 | tea->vd.lock = &tea->mutex; | 372 | tea->vd.lock = &tea->mutex; |
375 | tea->vd.v4l2_dev = tea->v4l2_dev; | 373 | tea->vd.v4l2_dev = tea->v4l2_dev; |
376 | tea->vd.ctrl_handler = &tea->ctrl_handler; | 374 | tea->vd.ctrl_handler = &tea->ctrl_handler; |
375 | tea->fops = tea575x_fops; | ||
376 | tea->fops.owner = owner; | ||
377 | tea->vd.fops = &tea->fops; | ||
377 | set_bit(V4L2_FL_USE_FH_PRIO, &tea->vd.flags); | 378 | set_bit(V4L2_FL_USE_FH_PRIO, &tea->vd.flags); |
378 | /* disable hw_freq_seek if we can't use it */ | 379 | /* disable hw_freq_seek if we can't use it */ |
379 | if (tea->cannot_read_data) | 380 | if (tea->cannot_read_data) |
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index a8faae1c85e4..0f2811eeeebd 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c | |||
@@ -2769,7 +2769,7 @@ static int __devinit snd_es1968_create(struct snd_card *card, | |||
2769 | chip->tea.ops = &snd_es1968_tea_ops; | 2769 | chip->tea.ops = &snd_es1968_tea_ops; |
2770 | strlcpy(chip->tea.card, "SF64-PCE2", sizeof(chip->tea.card)); | 2770 | strlcpy(chip->tea.card, "SF64-PCE2", sizeof(chip->tea.card)); |
2771 | sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); | 2771 | sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); |
2772 | if (!snd_tea575x_init(&chip->tea)) | 2772 | if (!snd_tea575x_init(&chip->tea, THIS_MODULE)) |
2773 | printk(KERN_INFO "es1968: detected TEA575x radio\n"); | 2773 | printk(KERN_INFO "es1968: detected TEA575x radio\n"); |
2774 | #endif | 2774 | #endif |
2775 | 2775 | ||
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index a416ea8af3e9..5265c576a26a 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -1254,7 +1254,7 @@ static int __devinit snd_fm801_create(struct snd_card *card, | |||
1254 | sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); | 1254 | sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); |
1255 | if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 && | 1255 | if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 && |
1256 | (tea575x_tuner & TUNER_TYPE_MASK) < 4) { | 1256 | (tea575x_tuner & TUNER_TYPE_MASK) < 4) { |
1257 | if (snd_tea575x_init(&chip->tea)) { | 1257 | if (snd_tea575x_init(&chip->tea, THIS_MODULE)) { |
1258 | snd_printk(KERN_ERR "TEA575x radio not found\n"); | 1258 | snd_printk(KERN_ERR "TEA575x radio not found\n"); |
1259 | snd_fm801_free(chip); | 1259 | snd_fm801_free(chip); |
1260 | return -ENODEV; | 1260 | return -ENODEV; |
@@ -1263,7 +1263,7 @@ static int __devinit snd_fm801_create(struct snd_card *card, | |||
1263 | /* autodetect tuner connection */ | 1263 | /* autodetect tuner connection */ |
1264 | for (tea575x_tuner = 1; tea575x_tuner <= 3; tea575x_tuner++) { | 1264 | for (tea575x_tuner = 1; tea575x_tuner <= 3; tea575x_tuner++) { |
1265 | chip->tea575x_tuner = tea575x_tuner; | 1265 | chip->tea575x_tuner = tea575x_tuner; |
1266 | if (!snd_tea575x_init(&chip->tea)) { | 1266 | if (!snd_tea575x_init(&chip->tea, THIS_MODULE)) { |
1267 | snd_printk(KERN_INFO "detected TEA575x radio type %s\n", | 1267 | snd_printk(KERN_INFO "detected TEA575x radio type %s\n", |
1268 | get_tea575x_gpio(chip)->name); | 1268 | get_tea575x_gpio(chip)->name); |
1269 | break; | 1269 | break; |