aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-05-13 16:49:32 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 18:21:11 -0300
commit4d7a2d6721a6380d4ffc26d81d2c8232fd0d2dfc (patch)
tree5ccac1dc6084363abdea5a63fe5d305421bd894c /drivers/media/video/cx231xx
parentV4L/DVB (11844): ir-kbd-i2c: Switch to the new-style device binding model (diff)
downloadlinux-dev-4d7a2d6721a6380d4ffc26d81d2c8232fd0d2dfc.tar.xz
linux-dev-4d7a2d6721a6380d4ffc26d81d2c8232fd0d2dfc.zip
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/cx231xx')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-cards.c3
-rw-r--r--drivers/media/video/cx231xx/cx231xx-i2c.c29
-rw-r--r--drivers/media/video/cx231xx/cx231xx.h1
3 files changed, 0 insertions, 33 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index 734f6eaefd9b..63d2239fd324 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -287,10 +287,7 @@ void cx231xx_register_i2c_ir(struct cx231xx *dev)
return;
/* REVISIT: instantiate IR device */
-}
-void cx231xx_set_ir(struct cx231xx *dev, struct IR_i2c *ir)
-{
/* detect & configure */
switch (dev->model) {
diff --git a/drivers/media/video/cx231xx/cx231xx-i2c.c b/drivers/media/video/cx231xx/cx231xx-i2c.c
index ac4099a49da0..33219dc4d649 100644
--- a/drivers/media/video/cx231xx/cx231xx-i2c.c
+++ b/drivers/media/video/cx231xx/cx231xx-i2c.c
@@ -424,34 +424,6 @@ static u32 functionality(struct i2c_adapter *adap)
return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C;
}
-/*
- * 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 cx231xx_i2c *bus = i2c_get_adapdata(client->adapter);
- struct cx231xx *dev = bus->dev;
-
- switch (client->addr << 1) {
- case 0x8e:
- {
- struct IR_i2c *ir = i2c_get_clientdata(client);
- dprintk1(1, "attach_inform: IR detected (%s).\n",
- ir->phys);
- cx231xx_set_ir(dev, ir);
- break;
- }
- break;
-
- default:
- break;
- }
-
- return 0;
-}
-
static struct i2c_algorithm cx231xx_algo = {
.master_xfer = cx231xx_i2c_xfer,
.functionality = functionality,
@@ -462,7 +434,6 @@ static struct i2c_adapter cx231xx_adap_template = {
.name = "cx231xx",
.id = I2C_HW_B_CX231XX,
.algo = &cx231xx_algo,
- .client_register = attach_inform,
};
static struct i2c_client cx231xx_client_template = {
diff --git a/drivers/media/video/cx231xx/cx231xx.h b/drivers/media/video/cx231xx/cx231xx.h
index 8c300f60fdff..e38eb2d425f7 100644
--- a/drivers/media/video/cx231xx/cx231xx.h
+++ b/drivers/media/video/cx231xx/cx231xx.h
@@ -739,7 +739,6 @@ extern struct cx231xx_board cx231xx_boards[];
extern struct usb_device_id cx231xx_id_table[];
extern const unsigned int cx231xx_bcount;
void cx231xx_register_i2c_ir(struct cx231xx *dev);
-void cx231xx_set_ir(struct cx231xx *dev, struct IR_i2c *ir);
int cx231xx_tuner_callback(void *ptr, int component, int command, int arg);
/* Provided by cx231xx-input.c */