[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>
This commit is contained in:

committed by
Mauro Carvalho Chehab

orang tua
0875eb755b
melakukan
5daf53a6eb
@@ -2769,7 +2769,7 @@ static int __devinit snd_es1968_create(struct snd_card *card,
|
||||
chip->tea.ops = &snd_es1968_tea_ops;
|
||||
strlcpy(chip->tea.card, "SF64-PCE2", sizeof(chip->tea.card));
|
||||
sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci));
|
||||
if (!snd_tea575x_init(&chip->tea))
|
||||
if (!snd_tea575x_init(&chip->tea, THIS_MODULE))
|
||||
printk(KERN_INFO "es1968: detected TEA575x radio\n");
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user