diff options
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/saa7164/saa7164-i2c.c | 62 |
1 files changed, 1 insertions, 61 deletions
diff --git a/linux/drivers/media/video/saa7164/saa7164-i2c.c b/linux/drivers/media/video/saa7164/saa7164-i2c.c index b4c3ba164..e6b091391 100644 --- a/linux/drivers/media/video/saa7164/saa7164-i2c.c +++ b/linux/drivers/media/video/saa7164/saa7164-i2c.c @@ -70,60 +70,6 @@ static int i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) return retval; } -static int attach_inform(struct i2c_client *client) -{ - struct saa7164_i2c *bus = i2c_get_adapdata(client->adapter); - struct saa7164_dev *dev = bus->dev; -#if 0 - struct tuner_setup tun_setup; -#endif - - dprintk(DBGLVL_I2C, "%s i2c attach [addr=0x%x,client=%s]\n", - client->driver->driver.name, client->addr, client->name); - - if (!client->driver->command) - return 0; -#if 0 - if (dev->tuner_type != UNSET) { - - dprintk(DBGLVL_I2C, - "%s (tuner) i2c attach [addr=0x%x,client=%s]\n", - client->driver->driver.name, client->addr, - client->name); - - if ((dev->tuner_addr == ADDR_UNSET) || - (dev->tuner_addr == client->addr)) { - - dprintk(DBGLVL_I2C, "%s (tuner || addr UNSET)\n", - client->driver->driver.name); - - dprintk(DBGLVL_I2C, - "%s i2c attach [addr=0x%x,client=%s]\n", - client->driver->driver.name, - client->addr, client->name); - - tun_setup.mode_mask = T_ANALOG_TV; - tun_setup.type = dev->tuner_type; - tun_setup.addr = dev->tuner_addr; - - client->driver->command(client, TUNER_SET_TYPE_ADDR, - &tun_setup); - } - } -#endif - - return 0; -} - -static int detach_inform(struct i2c_client *client) -{ - struct saa7164_dev *dev = i2c_get_adapdata(client->adapter); - - dprintk(DBGLVL_I2C, "i2c detach [client=%s]\n", client->name); - - return 0; -} - void saa7164_call_i2c_clients(struct saa7164_i2c *bus, unsigned int cmd, void *arg) { @@ -148,10 +94,7 @@ static struct i2c_algorithm saa7164_i2c_algo_template = { static struct i2c_adapter saa7164_i2c_adap_template = { .name = "saa7164", .owner = THIS_MODULE, - .id = I2C_HW_B_SAA7164, .algo = &saa7164_i2c_algo_template, - .client_register = attach_inform, - .client_unregister = detach_inform, }; static struct i2c_client saa7164_i2c_client_template = { @@ -185,10 +128,7 @@ int saa7164_i2c_register(struct saa7164_i2c *bus) bus->i2c_client.adapter = &bus->i2c_adap; - if (0 == bus->i2c_rc) { - printk(KERN_ERR "%s: i2c bus %d registered\n", - dev->name, bus->nr); - } else + if (0 != bus->i2c_rc) printk(KERN_ERR "%s: i2c bus %d register FAILED\n", dev->name, bus->nr); |