mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
[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 <[email protected]> CC: Ondrej Zary <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
0875eb755b
commit
5daf53a6eb
6 changed files with 11 additions and 9 deletions
|
|
@ -157,7 +157,7 @@ static int __devinit maxiradio_probe(struct pci_dev *pdev, const struct pci_devi
|
|||
goto err_out_free_region;
|
||||
|
||||
dev->io = pci_resource_start(pdev, 0);
|
||||
if (snd_tea575x_init(&dev->tea)) {
|
||||
if (snd_tea575x_init(&dev->tea, THIS_MODULE)) {
|
||||
printk(KERN_ERR "radio-maxiradio: Unable to detect TEA575x tuner\n");
|
||||
goto err_out_free_region;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ static int __devinit fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io)
|
|||
snprintf(fmr2->tea.bus_info, sizeof(fmr2->tea.bus_info), "%s:%s",
|
||||
fmr2->is_fmd2 ? "PnP" : "ISA", dev_name(pdev));
|
||||
|
||||
if (snd_tea575x_init(&fmr2->tea)) {
|
||||
if (snd_tea575x_init(&fmr2->tea, THIS_MODULE)) {
|
||||
printk(KERN_ERR "radio-sf16fmr2: Unable to detect TEA575x tuner\n");
|
||||
release_region(fmr2->io, 2);
|
||||
return -ENODEV;
|
||||
|
|
|
|||
Loading…
Reference in a new issue