diff options
author | Andy Walls <awalls@md.metrocast.net> | 2011-01-27 03:25:47 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-23 01:23:50 +0300 |
commit | 9b28500a59d7ee5da5adb43bcb384391cac401c4 (patch) | |
tree | 8cf3d412625919e0f707cf5fe85e837992ad84ed /drivers/macintosh | |
parent | 12d896e1c17978599a98510fdfaff27a4e82c0bf (diff) | |
download | linux-9b28500a59d7ee5da5adb43bcb384391cac401c4.tar.xz |
[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>
Diffstat (limited to 'drivers/macintosh')
0 files changed, 0 insertions, 0 deletions