summaryrefslogtreecommitdiff
path: root/sound/pci/fm801.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-05-19 14:57:03 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-06-11 23:02:54 +0400
commit5daf53a6eb5c54c618c9def388d81c2769fd11a0 (patch)
treeae26108d5971c8e9fb7fcc5d9795b12145a1466b /sound/pci/fm801.c
parent0875eb755b66a6766be117133dbb6d8157ace337 (diff)
downloadlinux-5daf53a6eb5c54c618c9def388d81c2769fd11a0.tar.xz
[media] snd_tea575x: Make the module using snd_tea575x the fops owner
Before this patch the owner field of the /dev/radio# device fops was set to the snd-tea575x-tuner module itself. Meaning that the module which was using it could be rmmod-ed while the device is open, and then BAD things happen. I know, as I found out the hard way :) Note that there is no need to also somehow increase the refcount of the snd-tea575x-tuner module itself, since any drivers using it will have symbolic references to it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> CC: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'sound/pci/fm801.c')
-rw-r--r--sound/pci/fm801.c4
1 files changed, 2 insertions, 2 deletions
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,
sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci));
if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 &&
(tea575x_tuner & TUNER_TYPE_MASK) < 4) {
- if (snd_tea575x_init(&chip->tea)) {
+ if (snd_tea575x_init(&chip->tea, THIS_MODULE)) {
snd_printk(KERN_ERR "TEA575x radio not found\n");
snd_fm801_free(chip);
return -ENODEV;
@@ -1263,7 +1263,7 @@ static int __devinit snd_fm801_create(struct snd_card *card,
/* autodetect tuner connection */
for (tea575x_tuner = 1; tea575x_tuner <= 3; tea575x_tuner++) {
chip->tea575x_tuner = tea575x_tuner;
- if (!snd_tea575x_init(&chip->tea)) {
+ if (!snd_tea575x_init(&chip->tea, THIS_MODULE)) {
snd_printk(KERN_INFO "detected TEA575x radio type %s\n",
get_tea575x_gpio(chip)->name);
break;