summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tveeprom.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-01-14 22:58:05 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2008-01-14 22:58:05 +0100
commit2a68d97abaf9b2194c9060de6f877427c08e2ecf (patch)
tree4f5e412c51871f0412ec0b95721faab73cbc260d /linux/drivers/media/video/tveeprom.c
parentb8fc485e6b70590178b108ef66e954d175c322fe (diff)
downloadmediapointer-dvb-s2-2a68d97abaf9b2194c9060de6f877427c08e2ecf.tar.gz
mediapointer-dvb-s2-2a68d97abaf9b2194c9060de6f877427c08e2ecf.tar.bz2
tveeprom: remove obsolete i2c driver code
From: Hans Verkuil <hverkuil@xs4all.nl> The i2c driver code was once added for the out-of-tree ivtv driver, but the ivtv driver hasn't used that for a long time so this code can now be removed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/tveeprom.c')
-rw-r--r--linux/drivers/media/video/tveeprom.c134
1 files changed, 0 insertions, 134 deletions
diff --git a/linux/drivers/media/video/tveeprom.c b/linux/drivers/media/video/tveeprom.c
index 9b95d2f28..81a85035f 100644
--- a/linux/drivers/media/video/tveeprom.c
+++ b/linux/drivers/media/video/tveeprom.c
@@ -749,140 +749,6 @@ int tveeprom_read(struct i2c_client *c, unsigned char *eedata, int len)
}
EXPORT_SYMBOL(tveeprom_read);
-/* ----------------------------------------------------------------------- */
-/* needed for ivtv.sf.net at the moment. Should go away in the long */
-/* run, just call the exported tveeprom_* directly, there is no point in */
-/* using the indirect way via i2c_driver->command() */
-
-static unsigned short normal_i2c[] = {
- 0xa0 >> 1,
- I2C_CLIENT_END,
-};
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
-static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
-#endif
-
-I2C_CLIENT_INSMOD;
-
-static struct i2c_driver i2c_driver_tveeprom;
-
-static int
-tveeprom_command(struct i2c_client *client,
- unsigned int cmd,
- void *arg)
-{
- struct tveeprom eeprom;
- u32 *eeprom_props = arg;
- u8 *buf;
-
- switch (cmd) {
- case 0:
- buf = kzalloc(256, GFP_KERNEL);
- tveeprom_read(client, buf, 256);
- tveeprom_hauppauge_analog(client, &eeprom, buf);
- kfree(buf);
- eeprom_props[0] = eeprom.tuner_type;
- eeprom_props[1] = eeprom.tuner_formats;
- eeprom_props[2] = eeprom.model;
- eeprom_props[3] = eeprom.revision;
- eeprom_props[4] = eeprom.has_radio;
- break;
- default:
- return -EINVAL;
- }
- return 0;
-}
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0)
-static int
-tveeprom_detect_client(struct i2c_adapter *adapter,
- int address,
- int kind)
-#else
-static int
-tveeprom_detect_client(struct i2c_adapter *adapter,
- int address,
- unsigned short flags,
- int kind)
-#endif
-{
- struct i2c_client *client;
-
- client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
- if (NULL == client)
- return -ENOMEM;
- client->addr = address;
- client->adapter = adapter;
- client->driver = &i2c_driver_tveeprom;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
- client->flags = I2C_CLIENT_ALLOW_USE;
-#endif
- snprintf(client->name, sizeof(client->name), "tveeprom");
- i2c_attach_client(client);
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
- MOD_INC_USE_COUNT;
-#endif
- return 0;
-}
-
-static int
-tveeprom_attach_adapter(struct i2c_adapter *adapter)
-{
-#ifdef I2C_CLASS_TV_ANALOG
- if (adapter->class & I2C_CLASS_TV_ANALOG)
-#else
- if (adapter->id == I2C_HW_B_BT848)
-#endif
- return i2c_probe(adapter, &addr_data, tveeprom_detect_client);
- return 0;
-}
-
-static int
-tveeprom_detach_client(struct i2c_client *client)
-{
- int err;
-
- err = i2c_detach_client(client);
- if (err < 0)
- return err;
- kfree(client);
- return 0;
-}
-
-static struct i2c_driver i2c_driver_tveeprom = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
- .owner = THIS_MODULE,
-#endif
-#endif
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
- .name = "tveeprom",
- .flags = I2C_DF_NOTIFY,
-#else
- .driver = {
- .name = "tveeprom",
- },
-#endif
- .id = I2C_DRIVERID_TVEEPROM,
- .attach_adapter = tveeprom_attach_adapter,
- .detach_client = tveeprom_detach_client,
- .command = tveeprom_command,
-};
-
-static int __init tveeprom_init(void)
-{
- return i2c_add_driver(&i2c_driver_tveeprom);
-}
-
-static void __exit tveeprom_exit(void)
-{
- i2c_del_driver(&i2c_driver_tveeprom);
-}
-
-module_init(tveeprom_init);
-module_exit(tveeprom_exit);
-
/*
* Local variables:
* c-basic-offset: 8