summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx/em28xx-i2c.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-09-07 01:16:50 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-07 01:16:50 -0300
commitb90712cf41e75451c3b515ed41d2eda714db3de1 (patch)
tree0cb1086e7ec58d067b43265ba23377f4683c09fb /linux/drivers/media/video/em28xx/em28xx-i2c.c
parent7e9376280a53b01b33a00591e26e6ca8587c0a7d (diff)
downloadmediapointer-dvb-s2-b90712cf41e75451c3b515ed41d2eda714db3de1.tar.gz
mediapointer-dvb-s2-b90712cf41e75451c3b515ed41d2eda714db3de1.tar.bz2
em28xx: ir-kbd-i2c initialization data should point to a persistent object
From: Mauro Carvalho Chehab <mchehab@redhat.com> 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 Brain Rogers, Dustin Mitchell, Andy Walls and Jean Delvare to rise this question. Before this patch, if ir-kbd-i2c were probed after em28xx, trash data were used. After the patch, no matter what order, it is properly reported as tested by me: input: i2c IR (i2c IR (EM2840 Hauppaug as /class/input/input10 ir-kbd-i2c: i2c IR (i2c IR (EM2840 Hauppaug detected at i2c-4/4-0030/ir0 [em28xx #0] Priority: high Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-i2c.c')
0 files changed, 0 insertions, 0 deletions