summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx/em28xx-i2c.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-05-13 19:49:32 +0000
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-05-13 19:49:32 +0000
commitff5842e7e95c426abf87bbdb32361c523b1b98f0 (patch)
treefd9bf420f0f88f681cee2a6abc859492e07c79b8 /linux/drivers/media/video/em28xx/em28xx-i2c.c
parentb60f8e0b02ee9d9ef582e9df01eb81e5218baf9e (diff)
downloadmediapointer-dvb-s2-ff5842e7e95c426abf87bbdb32361c523b1b98f0.tar.gz
mediapointer-dvb-s2-ff5842e7e95c426abf87bbdb32361c523b1b98f0.tar.bz2
ir-kbd-i2c: Use initialization data
From: Jean Delvare <khali@linux-fr.org> 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 'linux/drivers/media/video/em28xx/em28xx-i2c.c')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-i2c.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-i2c.c b/linux/drivers/media/video/em28xx/em28xx-i2c.c
index 40b17785b..fd6be0e2c 100644
--- a/linux/drivers/media/video/em28xx/em28xx-i2c.c
+++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c
@@ -451,27 +451,6 @@ static u32 functionality(struct i2c_adapter *adap)
return I2C_FUNC_SMBUS_EMUL;
}
-/*
- * attach_inform()
- * gets called when a device attaches to the i2c bus
- * does some basic configuration
- */
-static int attach_inform(struct i2c_client *client)
-{
- struct em28xx *dev = client->adapter->algo_data;
- struct IR_i2c *ir = i2c_get_clientdata(client);
-
- switch (client->addr << 1) {
- case 0x60:
- case 0x8e:
- dprintk1(1, "attach_inform: IR detected (%s).\n", ir->phys);
- em28xx_set_ir(dev, ir);
- break;
- }
-
- return 0;
-}
-
static struct i2c_algorithm em28xx_algo = {
.master_xfer = em28xx_i2c_xfer,
.functionality = functionality,
@@ -488,7 +467,6 @@ static struct i2c_adapter em28xx_adap_template = {
.name = "em28xx",
.id = I2C_HW_B_EM28XX,
.algo = &em28xx_algo,
- .client_register = attach_inform,
};
static struct i2c_client em28xx_client_template = {