1
linux/drivers/staging
Andy Walls 9b28500a59 [media] lirc_zilog: Remove broken, ineffective reference counting
The set_use_inc() and set_use_dec() functions tried to lock
the underlying bridge driver device instance in memory by
changing the use count on the device's i2c_clients.  This
worked for PCI devices (ivtv, cx18, bttv).  It doesn't
work for hot-pluggable usb devices (pvrusb2 and hdpvr).
With usb device instances, the driver may get locked into
memory, but the unplugged hardware is gone.

The set_use_inc() set_use_dec() functions also tried to have
lirc_zilog change its own module refernce count, which is
racy and not guaranteed to work.  The lirc_dev module does
actually perform proper module ref count manipulation on the
lirc_zilog module, so there is need for lirc_zilog to
attempt a buggy module get on itself anyway.

lirc_zilog also errantly called these functions on itself
in open() and close(), but lirc_dev did that already too.

So let's just gut the bodies of the set_use_*() functions,
and remove the extra calls to them from within lirc_zilog.

Proper reference counting of the struct IR, IR_rx, and IR_tx
objects -- to handle the case when the underlying
bttv, ivtv, cx18, hdpvr, or pvrusb2 bridge driver module or
device instance goes away -- will be added in subsequent
patches.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:23:50 -03:00
..
altera-stapl [media] Altera FPGA firmware download module 2011-03-21 20:32:16 -03:00
asus_oled
ath6kl Staging: ath6kl: fix potential buffer overflow 2011-01-20 12:01:23 -08:00
autofs Add a dentry op to allow processes to be held during pathwalk transit 2011-01-15 20:07:31 -05:00
bcm staging: fix build failure in bcm driver 2011-01-17 17:39:39 -08:00
brcm80211 staging: brcm80211: bugfix for softmac crash on multi cpu configurations 2011-02-02 15:06:15 -08:00
comedi Staging: Comedi: Fix a few NI module dependencies 2011-02-09 11:39:50 -08:00
cptm1217
crystalhd
cs5535_gpio cs5535: deprecate older cs5535_gpio driver 2011-01-13 08:03:13 -08:00
cx25821 [media] staging/cx25721: serialize access to devlist 2011-03-21 20:32:41 -03:00
cxd2099 [media] ngene: Fix compilation when cxd2099 is not enabled 2011-03-21 20:31:48 -03:00
cxt1e1
dt3155v4l [media] V4L: remove V4L1 compatibility mode 2010-12-29 08:17:07 -02:00
easycap [media] v4l: removal of old, obsolete ioctls 2011-03-21 20:32:12 -03:00
echo
et131x
frontier
ft1000
go7007 Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-01-10 16:04:53 -08:00
hv staging: hv: Enable sending GARP packet after live migration 2011-02-02 15:06:14 -08:00
iio Staging: iio: Aditional fixpoint formatted output bugfix 2011-01-22 06:32:21 -08:00
intel_sst staging: sst: Fix for dmic capture on v2 pmic 2011-02-02 15:06:14 -08:00
keucr
line6
lirc [media] lirc_zilog: Remove broken, ineffective reference counting 2011-03-22 19:23:50 -03:00
memrar
msm console: rename acquire/release_console_sem() to console_lock/unlock() 2011-01-26 10:50:06 +10:00
octeon
olpc_dcon console: rename acquire/release_console_sem() to console_lock/unlock() 2011-01-26 10:50:06 +10:00
panel
phison
pohmelfs pohmelfs: double-free and leak 2011-01-12 20:02:44 -05:00
quatech_usb2
quickstart
rt2860 staging: rt2860: Fix incorrect netif_stop_queue usage warning 2011-01-20 12:06:06 -08:00
rt2870
rtl8187se
rtl8192e
rtl8192u
rtl8712 staging: r8712u: Add new device IDs 2011-01-25 04:53:59 +08:00
samsung-laptop
sbe-2t3e3
sep
serqt_usb2
slicoss
sm7xx console: rename acquire/release_console_sem() to console_lock/unlock() 2011-01-26 10:50:06 +10:00
smbfs staging: smbfs building fix 2011-01-17 01:50:52 -05:00
solo6x10
speakup Staging: speakup: &&/|| confusion in silent_store() 2011-01-20 12:06:07 -08:00
spectra
ste_rmi4 Staging: ste_rmi4: use after input_unregister_device() 2011-01-20 12:01:23 -08:00
ti-st
tidspbridge staging: tidspbridge: replace mbox callback with notifier_call 2011-01-20 12:19:47 -08:00
tm6000 [media] tm6000: fix s-video input 2011-03-22 17:20:14 -03:00
usbip staging: usbip: vhci: use urb->dev->portnum to find port 2011-01-20 16:01:50 -08:00
vme Delete zero-length drivers/staging/vme/bridges/Module.symvers 2011-01-28 03:23:42 -05:00
vt6655
vt6656
westbridge
winbond
wlags49_h2
wlags49_h25
wlan-ng
xgifb Staging: xgfib: put parenthesis in the right place 2011-01-20 12:01:23 -08:00
zram staging: zram: fix data corruption issue 2011-02-09 11:39:51 -08:00
Kconfig [media] Altera FPGA firmware download module 2011-03-21 20:32:16 -03:00
Makefile [media] Altera FPGA firmware download module 2011-03-21 20:32:16 -03:00
staging.c