]> git.baikalelectronics.ru Git - kernel.git/commit
media: lgdt3306a: Fix module count mismatch on usb unplug
authorBrad Love <brad@nextdimension.cc>
Fri, 5 Jan 2018 14:57:12 +0000 (09:57 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Mar 2018 09:39:30 +0000 (04:39 -0500)
commit72c102dbda00783bd879584c1417f3b0e6aa2331
tree98c347be558b40b5574f2ee33bd504a16a3eb3fc
parent420ec4167ec1540e32b63502687b66e6abbf9170
media: lgdt3306a: Fix module count mismatch on usb unplug

When used as an i2c device there is a module usage count mismatch on
removal, preventing the driver from being used thereafter. dvb_attach
increments the usage count so it is properly balanced on removal.

On disconnect of Hauppauge SoloHD/DualHD before:

lsmod | grep lgdt3306a
lgdt3306a              28672  -1
i2c_mux                16384  1 lgdt3306a

On disconnect of Hauppauge SoloHD/DualHD after:

lsmod | grep lgdt3306a
lgdt3306a              28672  0
i2c_mux                16384  1 lgdt3306a

Signed-off-by: Brad Love <brad@nextdimension.cc>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-frontends/lgdt3306a.c