aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-10-02 04:47:08 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:41:01 -0500
commit43e16ea241cab1f4d4206307b2f6eacbaf4dc335 (patch)
treea070ba504f71ebda82277123b613789a1c7477e7 /drivers/media/video/em28xx
parent3c3099d5edd719aebfccf63b628b6f11afa59bfe (diff)
V4L/DVB (13233): i2c_board_info can be local
Recent fixes to the em28xx and saa7134 drivers have been overzealous. While the ir-kbd-i2c platform data indeed needs to be persistent, the struct i2c_board_info doesn't, as it is only used by i2c_new_device(). So revert a part of the original fixes, to save some memory. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c9
-rw-r--r--drivers/media/video/em28xx/em28xx.h1
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 7ccac2095b75..6c7cbbc59e1c 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -2234,6 +2234,7 @@ static int em28xx_hint_board(struct em28xx *dev)
2234/* ----------------------------------------------------------------------- */ 2234/* ----------------------------------------------------------------------- */
2235void em28xx_register_i2c_ir(struct em28xx *dev) 2235void em28xx_register_i2c_ir(struct em28xx *dev)
2236{ 2236{
2237 struct i2c_board_info info;
2237 const unsigned short addr_list[] = { 2238 const unsigned short addr_list[] = {
2238 0x30, 0x47, I2C_CLIENT_END 2239 0x30, 0x47, I2C_CLIENT_END
2239 }; 2240 };
@@ -2241,9 +2242,9 @@ void em28xx_register_i2c_ir(struct em28xx *dev)
2241 if (disable_ir) 2242 if (disable_ir)
2242 return; 2243 return;
2243 2244
2244 memset(&dev->info, 0, sizeof(&dev->info)); 2245 memset(&info, 0, sizeof(struct i2c_board_info));
2245 memset(&dev->init_data, 0, sizeof(dev->init_data)); 2246 memset(&dev->init_data, 0, sizeof(dev->init_data));
2246 strlcpy(dev->info.type, "ir_video", I2C_NAME_SIZE); 2247 strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
2247 2248
2248 /* detect & configure */ 2249 /* detect & configure */
2249 switch (dev->model) { 2250 switch (dev->model) {
@@ -2266,8 +2267,8 @@ void em28xx_register_i2c_ir(struct em28xx *dev)
2266 } 2267 }
2267 2268
2268 if (dev->init_data.name) 2269 if (dev->init_data.name)
2269 dev->info.platform_data = &dev->init_data; 2270 info.platform_data = &dev->init_data;
2270 i2c_new_probed_device(&dev->i2c_adap, &dev->info, addr_list); 2271 i2c_new_probed_device(&dev->i2c_adap, &info, addr_list);
2271} 2272}
2272 2273
2273void em28xx_card_setup(struct em28xx *dev) 2274void em28xx_card_setup(struct em28xx *dev)
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index 0a73e8bf0d6e..a476f7bb7bf8 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -615,7 +615,6 @@ struct em28xx {
615 struct em28xx_dvb *dvb; 615 struct em28xx_dvb *dvb;
616 616
617 /* I2C keyboard data */ 617 /* I2C keyboard data */
618 struct i2c_board_info info;
619 struct IR_i2c_init_data init_data; 618 struct IR_i2c_init_data init_data;
620}; 619};
621 620