android_kernel_xiaomi_sm8350/drivers/media/video/em28xx
Mauro Carvalho Chehab d2ebd0f806 V4L/DVB (12698): em28xx: ir-kbd-i2c init data needs 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, 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]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:15 -03:00
..
em28xx-audio.c V4L/DVB (11896): em28xx: Fix for Slow Memory Leak 2009-06-16 18:21:16 -03:00
em28xx-cards.c V4L/DVB (12698): em28xx: ir-kbd-i2c init data needs a persistent object 2009-09-12 12:20:15 -03:00
em28xx-core.c V4L/DVB (12405): em28xx-cards: move register 0x13 setting to the proper place 2009-08-13 20:39:10 -03:00
em28xx-dvb.c V4L/DVB (12432): em28xx: fix regression in Empire DualTV digital tuning 2009-08-13 20:39:13 -03:00
em28xx-i2c.c V4L/DVB (12343): Stop defining I2C adapter IDs nobody uses 2009-09-12 12:18:13 -03:00
em28xx-input.c V4L/DVB (11844): ir-kbd-i2c: Switch to the new-style device binding model 2009-06-16 18:21:11 -03:00
em28xx-reg.h V4L/DVB (12403): em28xx: properly reports some em2710 chips 2009-08-13 20:39:09 -03:00
em28xx-video.c V4L/DVB (12408): em28xx: Implement g/s_register via address match 2009-09-12 12:18:37 -03:00
em28xx.h V4L/DVB (12698): em28xx: ir-kbd-i2c init data needs a persistent object 2009-09-12 12:20:15 -03:00
Kconfig V4L/DVB (12138): em28xx: add support for Silvercrest Webcam 2009-07-05 14:30:05 -03:00
Makefile