hdpvr: fix i2c device registration on latest kernel
PATCH 1/1 hdpvr: fix i2c device registration on latest kernel
The i2c changes in 2.6.31 lead to the hdpvr driver oops'ing on load at the moment. These changes remedy that, and after some related changes in the lirc_zilog driver, IR is working again as well.
This patch is against http://hg.jannau.net/hdpvr/, which contains multiple related patches also required for properly enabling the IR part on the hdpvr. Tested on 2.6.30.5 and 2.6.31-rc8.
--- hdpvr-core.c | 5 +---- hdpvr-i2c.c | 48 ++++++++++++++++++++++++++++++------------------ hdpvr.h | 2 +- 3 files changed, 32 insertions(+), 23 deletions(-)
linux/drivers/media/video/hdpvr/hdpvr-core.c +1 -4
@@ -415,10 +415,7 @@/* deregister I2C adapter */ #if defined(CONFIG_I2C ) || defined(CONFIG_I2C_MODULE )mutex_lock (&dev->i2c_mutex); -if (dev->i2c_adapter) -i2c_del_adapter (dev->i2c_adapter); -kfree (dev->i2c_adapter); - dev->i2c_adapter =NULL ; +i2c_del_adapter (&dev->i2c_adapter);mutex_unlock (&dev->i2c_mutex);#endif /* CONFIG_I2C */
linux/drivers/media/video/hdpvr/hdpvr-i2c.c +30 -18
73 lines not on this page · raw message
linux/drivers/media/video/hdpvr/hdpvr.h +1 -1
@@ -101,7 +101,7 @@struct work_struct worker;/* I2C adapter */ -struct i2c_adapter *i2c_adapter; +struct i2c_adapter i2c_adapter;/* I2C lock */ struct mutex i2c_mutex;
Signature · 2 lines
Jarod Wilson [email protected]
Quoted 7 lines · Jarod Wilson
The i2c changes in 2.6.31 lead to the hdpvr driver oops'ing on load at the moment. These changes remedy that, and after some related changes in the
lirc_zilogdriver, IR is working again as well.This patch is against http://hg.jannau.net/hdpvr/, which contains multiple related patches also required for properly enabling the IR part on the hdpvr. Tested on 2.6.30.5 and 2.6.31-rc8.
Thanks, pushed to that tree. I'll prepare a merge request for all the hdpvr i2c/ir changes over the weekend.
Janne