V4L/DVB (12699): cx18: ir-kbd-i2c initialization data should point to a persistent...
authorAndy Walls <awalls@radix.net>
Sat, 5 Sep 2009 13:58:37 +0000 (10:58 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 12 Sep 2009 15:20:15 +0000 (12:20 -0300)
commit78f2e672b37ae8935ec0b97cedbc2d877ffa0c5f
tree1adcd5ce3515fd003d7336db668c27db3b0c53b5
parentd2ebd0f806fdb6104903365e355675934eec22b2
V4L/DVB (12699): cx18: ir-kbd-i2c initialization data should point to a persistent object

ir-kbd-i2c's ir_probe() function can be called much later (i.e. at ir-kbd-i2c
module load), than the lifetime of a struct IR_i2c_init_data allocated off of
the stack in cx18_i2c_new_ir() at registration time.  Make sure we pass
a pointer to a persistent IR_i2c_init_data object at i2c registration time.

Thanks to Brian Rogers for pointing out a solution, and Dustin Mitchell for
testing against a 2.6.30 kernel.

Reported-by: Dustin Mitchell <soxslayer@gmail.com>
Reported-by: Brian Rogers <brian@xyzw.org>
Tested-by: Dustin Mitchell <soxslayer@gmail.com>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx18/cx18-i2c.c