aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-i2c.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-05-13 15:49:32 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:21:11 -0400
commit4d7a2d6721a6380d4ffc26d81d2c8232fd0d2dfc (patch)
tree5ccac1dc6084363abdea5a63fe5d305421bd894c /drivers/media/video/em28xx/em28xx-i2c.c
parentc668f32dca105d876e51862a003a302fa61e4ae4 (diff)
V4L/DVB (11845): ir-kbd-i2c: Use initialization data
For specific boards, pass initialization data to ir-kbd-i2c instead of modifying the settings after the device is initialized. This is more efficient and easier to read. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-i2c.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-i2c.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c
index d90294cbb70d..2c86fcf089f5 100644
--- a/drivers/media/video/em28xx/em28xx-i2c.c
+++ b/drivers/media/video/em28xx/em28xx-i2c.c
@@ -451,27 +451,6 @@ static u32 functionality(struct i2c_adapter *adap)
451 return I2C_FUNC_SMBUS_EMUL; 451 return I2C_FUNC_SMBUS_EMUL;
452} 452}
453 453
454/*
455 * attach_inform()
456 * gets called when a device attaches to the i2c bus
457 * does some basic configuration
458 */
459static int attach_inform(struct i2c_client *client)
460{
461 struct em28xx *dev = client->adapter->algo_data;
462 struct IR_i2c *ir = i2c_get_clientdata(client);
463
464 switch (client->addr << 1) {
465 case 0x60:
466 case 0x8e:
467 dprintk1(1, "attach_inform: IR detected (%s).\n", ir->phys);
468 em28xx_set_ir(dev, ir);
469 break;
470 }
471
472 return 0;
473}
474
475static struct i2c_algorithm em28xx_algo = { 454static struct i2c_algorithm em28xx_algo = {
476 .master_xfer = em28xx_i2c_xfer, 455 .master_xfer = em28xx_i2c_xfer,
477 .functionality = functionality, 456 .functionality = functionality,
@@ -482,7 +461,6 @@ static struct i2c_adapter em28xx_adap_template = {
482 .name = "em28xx", 461 .name = "em28xx",
483 .id = I2C_HW_B_EM28XX, 462 .id = I2C_HW_B_EM28XX,
484 .algo = &em28xx_algo, 463 .algo = &em28xx_algo,
485 .client_register = attach_inform,
486}; 464};
487 465
488static struct i2c_client em28xx_client_template = { 466static struct i2c_client em28xx_client_template = {