diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-07 07:22:01 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 17:20:17 +0200 |
commit | 7aedd5ec87686c557d48584d69ad880c11a0984d (patch) | |
tree | 4b700249f4c94e76fdf86c7f45bc287631d721d7 /drivers/media/video/saa7134/saa7134.h | |
parent | V4L/DVB (12699): cx18: ir-kbd-i2c initialization data should point to a persi... (diff) | |
download | linux-7aedd5ec87686c557d48584d69ad880c11a0984d.tar.xz linux-7aedd5ec87686c557d48584d69ad880c11a0984d.zip |
V4L/DVB (12701): saa7134: 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 SAA7134, trash data
were used.
Compile tested only, but the patch is identical to em28xx one. So, it
should work properly.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134.h')
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index ac74903a5bd4..d18bb9643856 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h @@ -589,6 +589,10 @@ struct saa7134_dev { int nosignal; unsigned int insuspend; + /* I2C keyboard data */ + struct i2c_board_info info; + struct IR_i2c_init_data init_data; + /* SAA7134_MPEG_* */ struct saa7134_ts ts; struct saa7134_dmaqueue ts_q; |