]> git.baikalelectronics.ru Git - kernel.git/commit
[media] lirc_zilog: Extensive rework of ir_probe()/ir_remove()
authorAndy Walls <awalls@md.metrocast.net>
Sat, 15 Jan 2011 04:04:06 +0000 (01:04 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 Jan 2011 13:46:06 +0000 (11:46 -0200)
commita5190dde82e44e5ca4c0dfbc4a0a53f645ab1d7d
treea1fffd97eecbc39244bd21ee47dca6063e8ad5c8
parent7244cb5498e3a152d72cebbe95cf1bda75e2578b
[media] lirc_zilog: Extensive rework of ir_probe()/ir_remove()

This patch is an extensive rework of the ir_probe() and ir_remove() functions.

It removes all the double binding and allocation problems on module load.

It removes almost all the memory leaks on module exit and on device
instantiation failure. Proper destruction of the Rx polling kthread still
needs investigation and more work, but it is no worse than it already was.

This rework also had side effects that include:

- encapsulation of the ir_devices[] array
- serialization of access to the ir_devices[] array
- semantic change of the module parameter "disable_rx" to "tx_only"

If tx_only is true, the module does not claim the i2c_client for the IR Rx
function, and only claims and handles the i2c_client for the IR Tx function.
This is a first step in providing the option of letting ir-kbd-i2c.c handle
IR Rx function, while lirc_zilog handles the IR Tx function.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/lirc/lirc_zilog.c