Now that the zoran (zr36067) driver has been converted to instantiate
new-style i2c devices, we can drop the legacy mode of all the i2c chip
drivers which are exclusively used by zr36067. These are: adv7170,
adv7175, bt819, bt856, bt866, ks0127, saa7110, saa7114, saa7185 and
vpx3220. The only i2c chip driver which is shared with other cards is
saa7111.

Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
Tested-by: Martin Samuelsson <[EMAIL PROTECTED]>
Tested-by: Bernhard Praschinger <[EMAIL PROTECTED]>
---
 drivers/media/video/adv7170.c |   62 -------------------------------
 drivers/media/video/adv7175.c |   62 -------------------------------
 drivers/media/video/bt819.c   |   66 ---------------------------------
 drivers/media/video/bt856.c   |   43 ---------------------
 drivers/media/video/bt866.c   |   36 ------------------
 drivers/media/video/ks0127.c  |   36 ------------------
 drivers/media/video/saa7110.c |   49 ------------------------
 drivers/media/video/saa7114.c |   54 ---------------------------
 drivers/media/video/saa7185.c |   48 ------------------------
 drivers/media/video/vpx3220.c |   82 -----------------------------------------
 include/linux/i2c-id.h        |   11 -----
 11 files changed, 549 deletions(-)

--- linux-2.6.27-rc4.orig/include/linux/i2c-id.h        2008-08-21 
13:52:54.000000000 +0200
+++ linux-2.6.27-rc4/include/linux/i2c-id.h     2008-08-21 18:14:04.000000000 
+0200
@@ -37,8 +37,6 @@
 #define I2C_DRIVERID_TEA6415C   6      /* video matrix switch          */
 #define I2C_DRIVERID_TDA9840    7      /* stereo sound processor       */
 #define I2C_DRIVERID_SAA7111A   8      /* video input processor        */
-#define I2C_DRIVERID_SAA7185B  13      /* video encoder                */
-#define I2C_DRIVERID_SAA7110   22      /* video decoder                */
 #define I2C_DRIVERID_SAA5249   24      /* SAA5249 and compatibles      */
 #define I2C_DRIVERID_PCF8583   25      /* real time clock              */
 #define I2C_DRIVERID_SAB3036   26      /* SAB3036 tuner                */
@@ -46,12 +44,6 @@
 #define I2C_DRIVERID_TVMIXER    28      /* Mixer driver for tv cards    */
 #define I2C_DRIVERID_TVAUDIO    29      /* Generic TV sound driver      */
 #define I2C_DRIVERID_TDA9875    32      /* TV sound decoder chip        */
-#define I2C_DRIVERID_BT819     40     /* video decoder                 */
-#define I2C_DRIVERID_BT856     41     /* video encoder                 */
-#define I2C_DRIVERID_VPX3220   42     /* video decoder+vbi/vtxt        */
-#define I2C_DRIVERID_ADV7175   48     /* ADV 7175/7176 video encoder   */
-#define I2C_DRIVERID_SAA7114   49      /* video decoder                */
-#define I2C_DRIVERID_ADV7170   54      /* video encoder                */
 #define I2C_DRIVERID_SAA7191   57      /* video decoder                */
 #define I2C_DRIVERID_INDYCAM   58      /* SGI IndyCam                  */
 #define I2C_DRIVERID_OVCAMCHIP 61      /* OmniVision CMOS image sens.  */
@@ -71,8 +63,6 @@
 #define I2C_DRIVERID_UPD64031A 79      /* upd64031a video processor    */
 #define I2C_DRIVERID_SAA717X   80      /* saa717x video encoder        */
 #define I2C_DRIVERID_DS1672    81      /* Dallas/Maxim DS1672 RTC      */
-#define I2C_DRIVERID_BT866     85      /* Conexant bt866 video encoder */
-#define I2C_DRIVERID_KS0127    86      /* Samsung ks0127 video decoder */
 #define I2C_DRIVERID_TLV320AIC23B 87   /* TI TLV320AIC23B audio codec  */
 #define I2C_DRIVERID_WM8731    89      /* Wolfson WM8731 audio codec */
 #define I2C_DRIVERID_WM8750    90      /* Wolfson WM8750 audio codec */
@@ -100,7 +90,6 @@
 #define I2C_HW_B_RIVA          0x010010 /* Riva based graphics cards */
 #define I2C_HW_B_IOC           0x010011 /* IOC bit-wiggling */
 #define I2C_HW_B_IXP2000       0x010016 /* GPIO on IXP2000 systems */
-#define I2C_HW_B_ZR36067       0x010019 /* Zoran-36057/36067 based boards */
 #define I2C_HW_B_PCILYNX       0x01001a /* TI PCILynx I2C adapter */
 #define I2C_HW_B_CX2388x       0x01001b /* connexant 2388x based tv cards */
 #define I2C_HW_B_NVIDIA                0x01001c /* nvidia framebuffer driver */
--- linux-2.6.27-rc4.orig/drivers/media/video/adv7170.c 2008-08-21 
18:12:43.000000000 +0200
+++ linux-2.6.27-rc4/drivers/media/video/adv7170.c      2008-08-21 
18:17:38.000000000 +0200
@@ -80,12 +80,6 @@ struct adv7170 {
        int sat;
 };
 
-#define   I2C_ADV7170        0xd4
-#define   I2C_ADV7171        0x54
-
-static char adv7170_name[] = "adv7170";
-static char adv7171_name[] = "adv7171";
-
 static char *inputs[] = { "pass_through", "play_back" };
 static char *norms[] = { "PAL", "NTSC" };
 
@@ -368,59 +362,8 @@ adv7170_command (struct i2c_client *clie
 
 /* ----------------------------------------------------------------------- */
 
-/*
- * Generic i2c probe
- * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
- */
-static unsigned short normal_i2c[] =
-    { I2C_ADV7170 >> 1, (I2C_ADV7170 >> 1) + 1,
-       I2C_ADV7171 >> 1, (I2C_ADV7171 >> 1) + 1,
-       I2C_CLIENT_END
-};
-
-static unsigned short ignore = I2C_CLIENT_END;
-
-static struct i2c_client_address_data addr_data = {
-       .normal_i2c             = normal_i2c,
-       .probe                  = &ignore,
-       .ignore                 = &ignore,
-};
-
 static struct i2c_driver i2c_driver_adv7170;
 
-/* Return 0 if detection is successful, -ENODEV otherwise */
-static int
-adv7170_detect(struct i2c_client     *client,
-              int                    kind,
-              struct i2c_board_info *info)
-{
-       struct i2c_adapter *adapter = client->adapter;
-       char *dname;
-
-       dprintk(1,
-               KERN_INFO
-               "adv7170.c: detecting adv7170 client on address 0x%x\n",
-               client->addr << 1);
-
-       /* Check if the adapter supports the needed features */
-       if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-               return -ENODEV;
-
-       if ((client->addr == I2C_ADV7170 >> 1) ||
-           (client->addr == (I2C_ADV7170 >> 1) + 1)) {
-               dname = adv7170_name;
-       } else if ((client->addr == I2C_ADV7171 >> 1) ||
-                  (client->addr == (I2C_ADV7171 >> 1) + 1)) {
-               dname = adv7171_name;
-       } else {
-               /* We should never get here!!! */
-               return -ENODEV;
-       }
-       strlcpy(info->type, dname, I2C_NAME_SIZE);
-
-       return 0;
-}
-
 static int
 adv7170_probe(struct i2c_client          *client,
              const struct i2c_device_id *id)
@@ -477,14 +420,9 @@ static struct i2c_driver i2c_driver_adv7
                .name = "adv7170",      /* name */
        },
 
-       .class = I2C_CLASS_TV_ANALOG,
-       .id = I2C_DRIVERID_ADV7170,
-
        .probe = adv7170_probe,
        .remove = adv7170_remove,
        .id_table = adv7170_id,
-       .detect = adv7170_detect,
-       .address_data = &addr_data,
        .command = adv7170_command,
 };
 
--- linux-2.6.27-rc4.orig/drivers/media/video/adv7175.c 2008-08-21 
18:12:43.000000000 +0200
+++ linux-2.6.27-rc4/drivers/media/video/adv7175.c      2008-08-21 
18:17:44.000000000 +0200
@@ -74,12 +74,6 @@ struct adv7175 {
        int sat;
 };
 
-#define   I2C_ADV7175        0xd4
-#define   I2C_ADV7176        0x54
-
-static char adv7175_name[] = "adv7175";
-static char adv7176_name[] = "adv7176";
-
 static char *inputs[] = { "pass_through", "play_back", "color_bar" };
 static char *norms[] = { "PAL", "NTSC", "SECAM->PAL (may not work!)" };
 
@@ -386,59 +380,8 @@ adv7175_command (struct i2c_client *clie
 
 /* ----------------------------------------------------------------------- */
 
-/*
- * Generic i2c probe
- * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
- */
-static unsigned short normal_i2c[] =
-    { I2C_ADV7175 >> 1, (I2C_ADV7175 >> 1) + 1,
-       I2C_ADV7176 >> 1, (I2C_ADV7176 >> 1) + 1,
-       I2C_CLIENT_END
-};
-
-static unsigned short ignore = I2C_CLIENT_END;
-
-static struct i2c_client_address_data addr_data = {
-       .normal_i2c             = normal_i2c,
-       .probe                  = &ignore,
-       .ignore                 = &ignore,
-};
-
 static struct i2c_driver i2c_driver_adv7175;
 
-/* Return 0 if detection is successful, -ENODEV otherwise */
-static int
-adv7175_detect(struct i2c_client     *client,
-              int                    kind,
-              struct i2c_board_info *info)
-{
-       struct i2c_adapter *adapter = client->adapter;
-       char *dname;
-
-       dprintk(1,
-               KERN_INFO
-               "adv7175.c: detecting adv7175 client on address 0x%x\n",
-               client->addr << 1);
-
-       /* Check if the adapter supports the needed features */
-       if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-               return -ENODEV;
-
-       if ((client->addr == I2C_ADV7175 >> 1) ||
-           (client->addr == (I2C_ADV7175 >> 1) + 1)) {
-               dname = adv7175_name;
-       } else if ((client->addr == I2C_ADV7176 >> 1) ||
-                  (client->addr == (I2C_ADV7176 >> 1) + 1)) {
-               dname = adv7176_name;
-       } else {
-               /* We should never get here!!! */
-               return -ENODEV;
-       }
-       strlcpy(info->type, dname, I2C_NAME_SIZE);
-
-       return 0;
-}
-
 static int
 adv7175_probe(struct i2c_client          *client,
              const struct i2c_device_id *id)
@@ -495,14 +438,9 @@ static struct i2c_driver i2c_driver_adv7
                .name = "adv7175",      /* name */
        },
 
-       .class = I2C_CLASS_TV_ANALOG,
-       .id = I2C_DRIVERID_ADV7175,
-
        .probe = adv7175_probe,
        .remove = adv7175_remove,
        .id_table = adv7175_id,
-       .detect = adv7175_detect,
-       .address_data = &addr_data,
        .command = adv7175_command,
 };
 
--- linux-2.6.27-rc4.orig/drivers/media/video/bt819.c   2008-08-21 
18:12:43.000000000 +0200
+++ linux-2.6.27-rc4/drivers/media/video/bt819.c        2008-08-21 
18:17:49.000000000 +0200
@@ -97,8 +97,6 @@ static struct timing timing_data[] = {
        {858 - 24, 20, 525 - 2, 1, 0x00f8, 0x0000},
 };
 
-#define   I2C_BT819        0x8a
-
 /* ----------------------------------------------------------------------- */
 
 static inline int
@@ -486,67 +484,8 @@ bt819_command (struct i2c_client *client
 
 /* ----------------------------------------------------------------------- */
 
-/*
- * Generic i2c probe
- * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
- */
-static unsigned short normal_i2c[] = {
-       I2C_BT819 >> 1,
-       I2C_CLIENT_END,
-};
-
-static unsigned short ignore = I2C_CLIENT_END;
-
-static struct i2c_client_address_data addr_data = {
-       .normal_i2c             = normal_i2c,
-       .probe                  = &ignore,
-       .ignore                 = &ignore,
-};
-
 static struct i2c_driver i2c_driver_bt819;
 
-/* Return 0 if detection is successful, -ENODEV otherwise */
-static int
-bt819_detect(struct i2c_client     *client,
-            int                    kind,
-            struct i2c_board_info *info)
-{
-       int id;
-       struct i2c_adapter *adapter = client->adapter;
-       const char *dname;
-
-       dprintk(1,
-               KERN_INFO
-               "bt819: detecting bt819 client on address 0x%x\n",
-               client->addr << 1);
-
-       /* Check if the adapter supports the needed features */
-       if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-               return -ENODEV;
-
-       id = bt819_read(client, 0x17);
-       switch (id & 0xf0) {
-       case 0x70:
-               dname = "bt819a";
-               break;
-       case 0x60:
-               dname = "bt817a";
-               break;
-       case 0x20:
-               dname = "bt815a";
-               break;
-       default:
-               dprintk(1,
-                       KERN_ERR
-                       "bt819: unknown chip version 0x%x (ver 0x%x)\n",
-                       id & 0xf0, id & 0x0f);
-               return -ENODEV;
-       }
-       strlcpy(info->type, dname, I2C_NAME_SIZE);
-
-       return 0;
-}
-
 static int
 bt819_probe(struct i2c_client          *client,
            const struct i2c_device_id *did)
@@ -609,14 +548,9 @@ static struct i2c_driver i2c_driver_bt81
                .name = "bt819",
        },
 
-       .class = I2C_CLASS_TV_ANALOG,
-       .id = I2C_DRIVERID_BT819,
-
        .probe = bt819_probe,
        .remove = bt819_remove,
        .id_table = bt819_id,
-       .detect = bt819_detect,
-       .address_data = &addr_data,
        .command = bt819_command,
 };
 
--- linux-2.6.27-rc4.orig/drivers/media/video/bt856.c   2008-08-21 
18:12:43.000000000 +0200
+++ linux-2.6.27-rc4/drivers/media/video/bt856.c        2008-08-21 
18:18:01.000000000 +0200
@@ -78,8 +78,6 @@ struct bt856 {
        int enable;
 };
 
-#define   I2C_BT856        0x88
-
 /* ----------------------------------------------------------------------- */
 
 static inline int
@@ -276,44 +274,8 @@ bt856_command (struct i2c_client *client
 
 /* ----------------------------------------------------------------------- */
 
-/*
- * Generic i2c probe
- * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
- */
-static unsigned short normal_i2c[] = { I2C_BT856 >> 1, I2C_CLIENT_END };
-
-static unsigned short ignore = I2C_CLIENT_END;
-
-static struct i2c_client_address_data addr_data = {
-       .normal_i2c             = normal_i2c,
-       .probe                  = &ignore,
-       .ignore                 = &ignore,
-};
-
 static struct i2c_driver i2c_driver_bt856;
 
-/* Return 0 if detection is successful, -ENODEV otherwise */
-static int
-bt856_detect(struct i2c_client     *client,
-            int                    kind,
-            struct i2c_board_info *info)
-{
-       struct i2c_adapter *adapter = client->adapter;
-
-       dprintk(1,
-               KERN_INFO
-               "bt856.c: detecting bt856 client on address 0x%x\n",
-               client->addr << 1);
-
-       /* Check if the adapter supports the needed features */
-       if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-               return -ENODEV;
-
-       strlcpy(info->type, "bt856", I2C_NAME_SIZE);
-
-       return 0;
-}
-
 static int
 bt856_probe(struct i2c_client          *client,
            const struct i2c_device_id *id)
@@ -383,14 +345,9 @@ static struct i2c_driver i2c_driver_bt85
                .name = "bt856",
        },
 
-       .class = I2C_CLASS_TV_ANALOG,
-       .id = I2C_DRIVERID_BT856,
-
        .probe = bt856_probe,
        .remove = bt856_remove,
        .id_table = bt856_id,
-       .detect = bt856_detect,
-       .address_data = &addr_data,
        .command = bt856_command,
 };
 
--- linux-2.6.27-rc4.orig/drivers/media/video/bt866.c   2008-08-21 
18:12:44.000000000 +0200
+++ linux-2.6.27-rc4/drivers/media/video/bt866.c        2008-08-21 
18:14:04.000000000 +0200
@@ -53,7 +53,6 @@
 MODULE_LICENSE("GPL");
 
 #define        BT866_DEVNAME   "bt866"
-#define I2C_BT866      0x88
 
 MODULE_LICENSE("GPL");
 
@@ -268,8 +267,6 @@ static int bt866_write(struct bt866 *enc
        return 0;
 }
 
-static int bt866_detect(struct i2c_client *client, int kind,
-                       struct i2c_board_info *info);
 static int bt866_probe(struct i2c_client *client,
                       const struct i2c_device_id *id);
 static int bt866_remove(struct i2c_client *client);
@@ -277,17 +274,6 @@ static int bt866_command(struct i2c_clie
                         unsigned int cmd, void *arg);
 
 
-/* Addresses to scan */
-static unsigned short normal_i2c[]     = {I2C_BT866>>1, I2C_CLIENT_END};
-static unsigned short probe[2]         = {I2C_CLIENT_END, I2C_CLIENT_END};
-static unsigned short ignore[2]                = {I2C_CLIENT_END, 
I2C_CLIENT_END};
-
-static struct i2c_client_address_data addr_data = {
-       normal_i2c,
-       probe,
-       ignore,
-};
-
 static const struct i2c_device_id bt866_id[] = {
        { "bt866", 0 },
        { }
@@ -296,35 +282,13 @@ MODULE_DEVICE_TABLE(i2c, bt866_id);
 
 static struct i2c_driver i2c_driver_bt866 = {
        .driver.name = BT866_DEVNAME,
-       .class = I2C_CLASS_TV_ANALOG,
-       .id = I2C_DRIVERID_BT866,
        .probe = bt866_probe,
        .remove = bt866_remove,
        .id_table = bt866_id,
-       .detect = bt866_detect,
-       .address_data = &addr_data,
        .command = bt866_command
 };
 
 
-/* Return 0 if detection is successful, -ENODEV otherwise */
-static int bt866_detect(struct i2c_client *client, int kind,
-                       struct i2c_board_info *info)
-{
-       struct i2c_adapter *adapter = client->adapter;
-
-       if (adapter->id != I2C_HW_B_ZR36067)
-               return -ENODEV;
-
-       /* Check if the adapter supports the needed features */
-       if (!i2c_check_functionality(adapter, I2C_FUNC_I2C))
-               return -ENODEV;
-
-       strlcpy(info->type, "bt866", I2C_NAME_SIZE);
-
-       return 0;
-}
-
 static int bt866_probe(struct i2c_client *client,
                       const struct i2c_device_id *id)
 {
--- linux-2.6.27-rc4.orig/drivers/media/video/ks0127.c  2008-08-21 
18:12:44.000000000 +0200
+++ linux-2.6.27-rc4/drivers/media/video/ks0127.c       2008-08-21 
18:14:04.000000000 +0200
@@ -732,8 +732,6 @@ static int ks0127_command(struct i2c_cli
 
 
 
-static int ks0127_detect(struct i2c_client *client, int kind,
-                        struct i2c_board_info *info);
 static int ks0127_probe(struct i2c_client *client,
                        const struct i2c_device_id *id);
 static int ks0127_remove(struct i2c_client *client);
@@ -741,18 +739,6 @@ static int ks0127_command(struct i2c_cli
                          unsigned int cmd, void *arg);
 
 
-
-/* Addresses to scan */
-static unsigned short normal_i2c[] = {I2C_KS0127_ADDON>>1,
-                                      I2C_KS0127_ONBOARD>>1, I2C_CLIENT_END};
-static unsigned short probe[2] =       {I2C_CLIENT_END, I2C_CLIENT_END};
-static unsigned short ignore[2] =      {I2C_CLIENT_END, I2C_CLIENT_END};
-static struct i2c_client_address_data addr_data = {
-       normal_i2c,
-       probe,
-       ignore,
-};
-
 static const struct i2c_device_id ks0127_id[] = {
        { "ks0127", 0 },
        { }
@@ -761,34 +747,12 @@ MODULE_DEVICE_TABLE(i2c, ks0127_id);
 
 static struct i2c_driver i2c_driver_ks0127 = {
        .driver.name = "ks0127",
-       .class          = I2C_CLASS_TV_ANALOG,
-       .id             = I2C_DRIVERID_KS0127,
        .probe          = ks0127_probe,
        .remove         = ks0127_remove,
        .id_table       = ks0127_id,
-       .detect         = ks0127_detect,
-       .address_data   = &addr_data,
        .command        = ks0127_command
 };
 
-/* Return 0 if detection is successful, -ENODEV otherwise */
-static int ks0127_detect(struct i2c_client *client, int kind,
-                        struct i2c_board_info *info)
-{
-       struct i2c_adapter *adapter = client->adapter;
-
-       if (adapter->id != I2C_HW_B_ZR36067)
-               return -ENODEV;
-
-       /* Check if the adapter supports the needed features */
-       if (!i2c_check_functionality(adapter, I2C_FUNC_I2C))
-               return -ENODEV;
-
-       strlcpy(info->type, "ks0127", I2C_NAME_SIZE);
-
-       return 0;
-}
-
 static int ks0127_probe(struct i2c_client *client,
                        const struct i2c_device_id *id)
 {
--- linux-2.6.27-rc4.orig/drivers/media/video/saa7110.c 2008-08-21 
18:12:43.000000000 +0200
+++ linux-2.6.27-rc4/drivers/media/video/saa7110.c      2008-08-21 
18:18:30.000000000 +0200
@@ -59,8 +59,6 @@ MODULE_PARM_DESC(debug, "Debug level (0-
 #define SAA7110_MAX_INPUT      9       /* 6 CVBS, 3 SVHS */
 #define SAA7110_MAX_OUTPUT     0       /* its a decoder only */
 
-#define        I2C_SAA7110             0x9C    /* or 0x9E */
-
 #define SAA7110_NR_REG         0x35
 
 struct saa7110 {
@@ -447,50 +445,8 @@ saa7110_command (struct i2c_client *clie
 
 /* ----------------------------------------------------------------------- */
 
-/*
- * Generic i2c probe
- * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
- */
-static unsigned short normal_i2c[] = {
-       I2C_SAA7110 >> 1,
-       (I2C_SAA7110 >> 1) + 1,
-       I2C_CLIENT_END
-};
-
-static unsigned short ignore = I2C_CLIENT_END;
-
-static struct i2c_client_address_data addr_data = {
-       .normal_i2c             = normal_i2c,
-       .probe                  = &ignore,
-       .ignore                 = &ignore,
-};
-
 static struct i2c_driver i2c_driver_saa7110;
 
-/* Return 0 if detection is successful, -ENODEV otherwise */
-static int
-saa7110_detect(struct i2c_client     *client,
-              int                    kind,
-              struct i2c_board_info *info)
-{
-       struct i2c_adapter *adapter = client->adapter;
-
-       dprintk(1,
-               KERN_INFO
-               "saa7110.c: detecting saa7110 client on address 0x%x\n",
-               client->addr << 1);
-
-       /* Check if the adapter supports the needed features */
-       if (!i2c_check_functionality
-           (adapter,
-            I2C_FUNC_SMBUS_READ_BYTE | I2C_FUNC_SMBUS_WRITE_BYTE_DATA))
-               return -ENODEV;
-
-       strlcpy(info->type, "saa7110", I2C_NAME_SIZE);
-
-       return 0;
-}
-
 static int
 saa7110_probe(struct i2c_client          *client,
              const struct i2c_device_id *id)
@@ -565,14 +521,9 @@ static struct i2c_driver i2c_driver_saa7
                .name = "saa7110",
        },
 
-       .class = I2C_CLASS_TV_ANALOG,
-       .id = I2C_DRIVERID_SAA7110,
-
        .probe = saa7110_probe,
        .remove = saa7110_remove,
        .id_table = saa7110_id,
-       .detect = saa7110_detect,
-       .address_data = &addr_data,
        .command = saa7110_command,
 };
 
--- linux-2.6.27-rc4.orig/drivers/media/video/saa7114.c 2008-08-21 
18:12:44.000000000 +0200
+++ linux-2.6.27-rc4/drivers/media/video/saa7114.c      2008-08-21 
18:18:36.000000000 +0200
@@ -81,9 +81,6 @@ struct saa7114 {
        int playback;
 };
 
-#define   I2C_SAA7114        0x42
-#define   I2C_SAA7114A       0x40
-
 #define   I2C_DELAY   10
 
 
@@ -801,54 +798,8 @@ saa7114_command (struct i2c_client *clie
 
 /* ----------------------------------------------------------------------- */
 
-/*
- * Generic i2c probe
- * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
- */
-static unsigned short normal_i2c[] =
-    { I2C_SAA7114 >> 1, I2C_SAA7114A >> 1, I2C_CLIENT_END };
-
-static unsigned short ignore = I2C_CLIENT_END;
-
-static struct i2c_client_address_data addr_data = {
-       .normal_i2c             = normal_i2c,
-       .probe                  = &ignore,
-       .ignore                 = &ignore,
-};
-
 static struct i2c_driver i2c_driver_saa7114;
 
-/* Return 0 if detection is successful, -ENODEV otherwise */
-static int
-saa7114_detect(struct i2c_client     *client,
-              int                    kind,
-              struct i2c_board_info *info)
-{
-       int i;
-       const u8 id[6] = { 0x1, 0xf, 0x7, 0x1, 0x1, 0x4 };
-       struct i2c_adapter *adapter = client->adapter;
-
-       dprintk(1,
-               KERN_INFO
-               "saa7114.c: detecting saa7114 client on address 0x%x\n",
-               client->addr << 1);
-
-       /* Check if the adapter supports the needed features */
-       if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-               return -ENODEV;
-
-       /* Make sure it's a SAA7114 chip */
-       for (i = 0; i < ARRAY_SIZE(id); i++) {
-               i2c_smbus_write_byte_data(client, 0, i);
-               if ((i2c_smbus_read_byte_data(client, 0) & 0xf) != id[i])
-                       return -ENODEV;
-       }
-
-       strlcpy(info->type, "saa7114_old", I2C_NAME_SIZE);
-
-       return 0;
-}
-
 static int
 saa7114_probe(struct i2c_client          *client,
              const struct i2c_device_id *id)
@@ -1181,14 +1132,9 @@ static struct i2c_driver i2c_driver_saa7
                .name = "saa7114",
        },
 
-       .class = I2C_CLASS_TV_ANALOG,
-       .id = I2C_DRIVERID_SAA7114,
-
        .probe = saa7114_probe,
        .remove = saa7114_remove,
        .id_table = saa7114_id,
-       .detect = saa7114_detect,
-       .address_data = &addr_data,
        .command = saa7114_command,
 };
 
--- linux-2.6.27-rc4.orig/drivers/media/video/saa7185.c 2008-08-21 
18:12:44.000000000 +0200
+++ linux-2.6.27-rc4/drivers/media/video/saa7185.c      2008-08-21 
18:18:41.000000000 +0200
@@ -75,8 +75,6 @@ struct saa7185 {
        int sat;
 };
 
-#define   I2C_SAA7185        0x88
-
 /* ----------------------------------------------------------------------- */
 
 static inline int
@@ -368,49 +366,8 @@ saa7185_command (struct i2c_client *clie
 
 /* ----------------------------------------------------------------------- */
 
-/*
- * Generic i2c probe
- * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
- */
-static unsigned short normal_i2c[] = { I2C_SAA7185 >> 1, I2C_CLIENT_END };
-
-static unsigned short ignore = I2C_CLIENT_END;
-
-static struct i2c_client_address_data addr_data = {
-       .normal_i2c             = normal_i2c,
-       .probe                  = &ignore,
-       .ignore                 = &ignore,
-};
-
 static struct i2c_driver i2c_driver_saa7185;
 
-/* Return 0 if detection is successful, -ENODEV otherwise */
-static int
-saa7185_detect(struct i2c_client     *client,
-              int                    kind,
-              struct i2c_board_info *info)
-{
-       struct i2c_adapter *adapter = client->adapter;
-
-       dprintk(1,
-               KERN_INFO
-               "saa7185.c: detecting saa7185 client on address 0x%x\n",
-               client->addr << 1);
-
-       /* Check if the adapter supports the needed features */
-       if (!i2c_check_functionality(adapter,
-                                    I2C_FUNC_SMBUS_WRITE_BYTE_DATA
-                                    | I2C_FUNC_SMBUS_READ_BYTE))
-               return -ENODEV;
-
-       if ((i2c_smbus_read_byte(client) >> 5) > 4)
-               return -ENODEV;
-
-       strlcpy(info->type, "saa7185", I2C_NAME_SIZE);
-
-       return 0;
-}
-
 static int
 saa7185_probe(struct i2c_client          *client,
              const struct i2c_device_id *id)
@@ -471,14 +428,9 @@ static struct i2c_driver i2c_driver_saa7
                .name = "saa7185",      /* name */
        },
 
-       .class = I2C_CLASS_TV_ANALOG,
-       .id = I2C_DRIVERID_SAA7185B,
-
        .probe = saa7185_probe,
        .remove = saa7185_remove,
        .id_table = saa7185_id,
-       .detect = saa7185_detect,
-       .address_data = &addr_data,
        .command = saa7185_command,
 };
 
--- linux-2.6.27-rc4.orig/drivers/media/video/vpx3220.c 2008-08-21 
18:12:44.000000000 +0200
+++ linux-2.6.27-rc4/drivers/media/video/vpx3220.c      2008-08-21 
18:18:49.000000000 +0200
@@ -37,7 +37,6 @@
 #include <media/v4l2-common.h>
 #include <linux/video_decoder.h>
 
-#define I2C_VPX3220        0x86
 #define VPX3220_DEBUG  KERN_DEBUG "vpx3220: "
 
 static int debug;
@@ -569,23 +568,6 @@ vpx3220_init_client (struct i2c_client *
  * Client management code
  */
 
-/*
- * Generic i2c probe
- * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
- */
-static unsigned short normal_i2c[] =
-    { I2C_VPX3220 >> 1, (I2C_VPX3220 >> 1) + 4,
-       I2C_CLIENT_END
-};
-
-static unsigned short ignore = I2C_CLIENT_END;
-
-static struct i2c_client_address_data addr_data = {
-       .normal_i2c             = normal_i2c,
-       .probe                  = &ignore,
-       .ignore                 = &ignore,
-};
-
 static struct i2c_driver vpx3220_i2c_driver;
 
 static int
@@ -598,65 +580,6 @@ vpx3220_remove(struct i2c_client *client
        return 0;
 }
 
-/* Return 0 if detection is successful, -ENODEV otherwise */
-static int
-vpx3220_detect(struct i2c_client     *client,
-              int                    kind,
-              struct i2c_board_info *info)
-{
-       struct i2c_adapter *adapter = client->adapter;
-       const char *dname;
-
-       dprintk(1, VPX3220_DEBUG "%s\n", __func__);
-
-       /* Check if the adapter supports the needed features */
-       if (!i2c_check_functionality
-           (adapter, I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA))
-               return -ENODEV;
-
-       /* Check for manufacture ID and part number */
-       if (kind < 0) {
-               u8 id;
-               u16 pn;
-
-               id = i2c_smbus_read_byte_data(client, 0x00);
-               if (id != 0xec) {
-                       dprintk(1,
-                               KERN_INFO
-                               "vpx3220_attach: Wrong manufacturer ID 
(0x%02x)\n",
-                               id);
-                       return -ENODEV;
-               }
-
-               pn = (i2c_smbus_read_byte_data(client, 0x02) << 8) +
-                   i2c_smbus_read_byte_data(client, 0x01);
-               switch (pn) {
-               case 0x4680:
-                       dname = "vpx3220a";
-                       break;
-               case 0x4260:
-                       dname = "vpx3216b";
-                       break;
-               case 0x4280:
-                       dname = "vpx3214c";
-                       break;
-               default:
-                       dprintk(1,
-                               KERN_INFO
-                               "%s: Wrong part number (0x%04x)\n",
-                               __func__, pn);
-                       return -ENODEV;
-               }
-       } else {
-               /* Can't actually happen */
-               return -ENODEV;
-       }
-
-       strlcpy(info->type, dname, I2C_NAME_SIZE);
-
-       return 0;
-}
-
 static int
 vpx3220_probe(struct i2c_client          *client,
              const struct i2c_device_id *id)
@@ -701,14 +624,9 @@ static struct i2c_driver vpx3220_i2c_dri
                .name = "vpx3220",
        },
 
-       .class = I2C_CLASS_TV_ANALOG,
-       .id = I2C_DRIVERID_VPX3220,
-
        .probe = vpx3220_probe,
        .remove = vpx3220_remove,
        .id_table = vpx3220_id,
-       .detect = vpx3220_detect,
-       .address_data = &addr_data,
        .command = vpx3220_command,
 };
 


-- 
Jean Delvare

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to