]> git.baikalelectronics.ru Git - kernel.git/commit
[media] snd_tea575x: Make the module using snd_tea575x the fops owner
authorHans de Goede <hdegoede@redhat.com>
Sat, 19 May 2012 10:57:03 +0000 (07:57 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 11 Jun 2012 19:02:54 +0000 (16:02 -0300)
commit044e459394b1d43fdbbcfa10644ac7ac3d7f13dc
treeae26108d5971c8e9fb7fcc5d9795b12145a1466b
parent53eade47d250ac5f216c382abc9ee445ea796f05
[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>
drivers/media/radio/radio-maxiradio.c
drivers/media/radio/radio-sf16fmr2.c
include/sound/tea575x-tuner.h
sound/i2c/other/tea575x-tuner.c
sound/pci/es1968.c
sound/pci/fm801.c