The patch number 10731 was added via Hans Verkuil <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <[email protected]>

------

From: Hans Verkuil  <[email protected]>
zoran i2c modules: remove i2c autoprobing support.


Zoran doesn't do autoprobing anymore, so remove support for this from the
i2c modules.

Priority: normal

Signed-off-by: Hans Verkuil <[email protected]>


---

 linux/drivers/media/video/adv7170.c |   11 +++--------
 linux/drivers/media/video/adv7175.c |   11 +++--------
 linux/drivers/media/video/bt819.c   |   11 +++--------
 linux/drivers/media/video/bt856.c   |   11 +++--------
 linux/drivers/media/video/bt866.c   |   17 +++--------------
 linux/drivers/media/video/ks0127.c  |   19 ++++---------------
 linux/drivers/media/video/saa7110.c |   11 +++--------
 linux/drivers/media/video/saa7127.c |    1 -
 linux/drivers/media/video/saa7185.c |   11 +++--------
 linux/drivers/media/video/vpx3220.c |   11 +++--------
 10 files changed, 28 insertions(+), 86 deletions(-)

diff -r 6c37a40e3d05 -r 41f06f6170de linux/drivers/media/video/adv7170.c
--- a/linux/drivers/media/video/adv7170.c       Thu Feb 19 21:31:17 2009 +0100
+++ b/linux/drivers/media/video/adv7170.c       Thu Feb 19 21:41:19 2009 +0100
@@ -37,13 +37,14 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-chip-ident.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include "compat.h"
 
 MODULE_DESCRIPTION("Analog Devices ADV7170 video encoder driver");
 MODULE_AUTHOR("Maxim Yevtyushkin");
 MODULE_LICENSE("GPL");
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
 static unsigned short normal_i2c[] = {
        0xd4 >> 1, 0xd6 >> 1,   /* adv7170 IDs */
        0x54 >> 1, 0x56 >> 1,   /* adv7171 IDs */
@@ -51,6 +52,7 @@ static unsigned short normal_i2c[] = {
 };
 
 I2C_CLIENT_INSMOD;
+#endif
 
 static int debug;
 module_param(debug, int, 0);
@@ -272,11 +274,6 @@ static int adv7170_g_chip_ident(struct v
        return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7170, 0);
 }
 
-static int adv7170_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops adv7170_core_ops = {
@@ -351,8 +348,6 @@ MODULE_DEVICE_TABLE(i2c, adv7170_id);
 #endif
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "adv7170",
-       .driverid = I2C_DRIVERID_ADV7170,
-       .command = adv7170_command,
        .probe = adv7170_probe,
        .remove = adv7170_remove,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
diff -r 6c37a40e3d05 -r 41f06f6170de linux/drivers/media/video/adv7175.c
--- a/linux/drivers/media/video/adv7175.c       Thu Feb 19 21:31:17 2009 +0100
+++ b/linux/drivers/media/video/adv7175.c       Thu Feb 19 21:41:19 2009 +0100
@@ -33,7 +33,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-chip-ident.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include "compat.h"
 
 MODULE_DESCRIPTION("Analog Devices ADV7175 video encoder driver");
@@ -43,6 +43,7 @@ MODULE_LICENSE("GPL");
 #define   I2C_ADV7175        0xd4
 #define   I2C_ADV7176        0x54
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
 static unsigned short normal_i2c[] = {
        I2C_ADV7175 >> 1, (I2C_ADV7175 >> 1) + 1,
        I2C_ADV7176 >> 1, (I2C_ADV7176 >> 1) + 1,
@@ -50,6 +51,7 @@ static unsigned short normal_i2c[] = {
 };
 
 I2C_CLIENT_INSMOD;
+#endif
 
 static int debug;
 module_param(debug, int, 0);
@@ -310,11 +312,6 @@ static int adv7175_g_chip_ident(struct v
        return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7175, 0);
 }
 
-static int adv7175_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops adv7175_core_ops = {
@@ -390,8 +387,6 @@ MODULE_DEVICE_TABLE(i2c, adv7175_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "adv7175",
-       .driverid = I2C_DRIVERID_ADV7175,
-       .command = adv7175_command,
        .probe = adv7175_probe,
        .remove = adv7175_remove,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
diff -r 6c37a40e3d05 -r 41f06f6170de linux/drivers/media/video/bt819.c
--- a/linux/drivers/media/video/bt819.c Thu Feb 19 21:31:17 2009 +0100
+++ b/linux/drivers/media/video/bt819.c Thu Feb 19 21:41:19 2009 +0100
@@ -38,7 +38,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-chip-ident.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include "compat.h"
 
 MODULE_DESCRIPTION("Brooktree-819 video decoder driver");
@@ -49,9 +49,11 @@ module_param(debug, int, 0);
 module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
 static unsigned short normal_i2c[] = { 0x8a >> 1, I2C_CLIENT_END };
 
 I2C_CLIENT_INSMOD;
+#endif
 
 /* ----------------------------------------------------------------------- */
 
@@ -429,11 +431,6 @@ static int bt819_g_chip_ident(struct v4l
        return v4l2_chip_ident_i2c_client(client, chip, decoder->ident, 0);
 }
 
-static int bt819_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops bt819_core_ops = {
@@ -540,8 +537,6 @@ MODULE_DEVICE_TABLE(i2c, bt819_id);
 #endif
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "bt819",
-       .driverid = I2C_DRIVERID_BT819,
-       .command = bt819_command,
        .probe = bt819_probe,
        .remove = bt819_remove,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
diff -r 6c37a40e3d05 -r 41f06f6170de linux/drivers/media/video/bt856.c
--- a/linux/drivers/media/video/bt856.c Thu Feb 19 21:31:17 2009 +0100
+++ b/linux/drivers/media/video/bt856.c Thu Feb 19 21:41:19 2009 +0100
@@ -37,7 +37,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-chip-ident.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include "compat.h"
 
 MODULE_DESCRIPTION("Brooktree-856A video encoder driver");
@@ -48,9 +48,11 @@ module_param(debug, int, 0);
 module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
 static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END };
 
 I2C_CLIENT_INSMOD;
+#endif
 
 /* ----------------------------------------------------------------------- */
 
@@ -188,11 +190,6 @@ static int bt856_g_chip_ident(struct v4l
        return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_BT856, 0);
 }
 
-static int bt856_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops bt856_core_ops = {
@@ -273,8 +270,6 @@ MODULE_DEVICE_TABLE(i2c, bt856_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "bt856",
-       .driverid = I2C_DRIVERID_BT856,
-       .command = bt856_command,
        .probe = bt856_probe,
        .remove = bt856_remove,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
diff -r 6c37a40e3d05 -r 41f06f6170de linux/drivers/media/video/bt866.c
--- a/linux/drivers/media/video/bt866.c Thu Feb 19 21:31:17 2009 +0100
+++ b/linux/drivers/media/video/bt866.c Thu Feb 19 21:41:19 2009 +0100
@@ -37,7 +37,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-chip-ident.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include "compat.h"
 
 MODULE_DESCRIPTION("Brooktree-866 video encoder driver");
@@ -48,9 +48,11 @@ module_param(debug, int, 0);
 module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
 static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END };
 
 I2C_CLIENT_INSMOD;
+#endif
 
 /* ----------------------------------------------------------------------- */
 
@@ -186,11 +188,6 @@ static int bt866_g_chip_ident(struct v4l
        return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_BT866, 0);
 }
 
-static int bt866_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops bt866_core_ops = {
@@ -233,11 +230,6 @@ static int bt866_remove(struct i2c_clien
        return 0;
 }
 
-static int bt866_legacy_probe(struct i2c_adapter *adapter)
-{
-       return adapter->id == I2C_HW_B_ZR36067;
-}
-
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
 static const struct i2c_device_id bt866_id[] = {
        { "bt866", 0 },
@@ -248,11 +240,8 @@ MODULE_DEVICE_TABLE(i2c, bt866_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "bt866",
-       .driverid = I2C_DRIVERID_BT866,
-       .command = bt866_command,
        .probe = bt866_probe,
        .remove = bt866_remove,
-       .legacy_probe = bt866_legacy_probe,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
        .id_table = bt866_id,
 #endif
diff -r 6c37a40e3d05 -r 41f06f6170de linux/drivers/media/video/ks0127.c
--- a/linux/drivers/media/video/ks0127.c        Thu Feb 19 21:31:17 2009 +0100
+++ b/linux/drivers/media/video/ks0127.c        Thu Feb 19 21:41:19 2009 +0100
@@ -42,7 +42,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-chip-ident.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include "ks0127.h"
 #include "compat.h"
 
@@ -50,10 +50,11 @@ MODULE_AUTHOR("Ryan Drake");
 MODULE_AUTHOR("Ryan Drake");
 MODULE_LICENSE("GPL");
 
-/* Addresses to scan */
+/* Addresses */
 #define I2C_KS0127_ADDON   0xD8
 #define I2C_KS0127_ONBOARD 0xDA
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
 static unsigned short normal_i2c[] = {
        I2C_KS0127_ADDON >> 1,
        I2C_KS0127_ONBOARD >> 1,
@@ -61,6 +62,7 @@ static unsigned short normal_i2c[] = {
 };
 
 I2C_CLIENT_INSMOD;
+#endif
 
 /* ks0127 control registers */
 #define KS_STAT     0x00
@@ -651,11 +653,6 @@ static int ks0127_g_chip_ident(struct v4
        return v4l2_chip_ident_i2c_client(client, chip, ks->ident, 0);
 }
 
-static int ks0127_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops ks0127_core_ops = {
@@ -716,11 +713,6 @@ static int ks0127_remove(struct i2c_clie
        ks0127_write(sd, KS_CMDA, 0x2c | 0x80); /* power down */
        kfree(to_ks0127(sd));
        return 0;
-}
-
-static int ks0127_legacy_probe(struct i2c_adapter *adapter)
-{
-       return adapter->id == I2C_HW_B_ZR36067;
 }
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
@@ -735,11 +727,8 @@ MODULE_DEVICE_TABLE(i2c, ks0127_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "ks0127",
-       .driverid = I2C_DRIVERID_KS0127,
-       .command = ks0127_command,
        .probe = ks0127_probe,
        .remove = ks0127_remove,
-       .legacy_probe = ks0127_legacy_probe,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
        .id_table = ks0127_id,
 #endif
diff -r 6c37a40e3d05 -r 41f06f6170de linux/drivers/media/video/saa7110.c
--- a/linux/drivers/media/video/saa7110.c       Thu Feb 19 21:31:17 2009 +0100
+++ b/linux/drivers/media/video/saa7110.c       Thu Feb 19 21:41:19 2009 +0100
@@ -36,16 +36,18 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-chip-ident.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include "compat.h"
 
 MODULE_DESCRIPTION("Philips SAA7110 video decoder driver");
 MODULE_AUTHOR("Pauline Middelink");
 MODULE_LICENSE("GPL");
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
 static unsigned short normal_i2c[] = { 0x9c >> 1, 0x9e >> 1, I2C_CLIENT_END };
 
 I2C_CLIENT_INSMOD;
+#endif
 
 static int debug;
 module_param(debug, int, 0);
@@ -409,11 +411,6 @@ static int saa7110_g_chip_ident(struct v
        return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_SAA7110, 0);
 }
 
-static int saa7110_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops saa7110_core_ops = {
@@ -519,8 +516,6 @@ MODULE_DEVICE_TABLE(i2c, saa7110_id);
 #endif
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "saa7110",
-       .driverid = I2C_DRIVERID_SAA7110,
-       .command = saa7110_command,
        .probe = saa7110_probe,
        .remove = saa7110_remove,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
diff -r 6c37a40e3d05 -r 41f06f6170de linux/drivers/media/video/saa7127.c
--- a/linux/drivers/media/video/saa7127.c       Thu Feb 19 21:31:17 2009 +0100
+++ b/linux/drivers/media/video/saa7127.c       Thu Feb 19 21:41:19 2009 +0100
@@ -826,7 +826,6 @@ MODULE_DEVICE_TABLE(i2c, saa7127_id);
 #endif
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "saa7127",
-       .driverid = I2C_DRIVERID_SAA7127,
        .probe = saa7127_probe,
        .remove = saa7127_remove,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
diff -r 6c37a40e3d05 -r 41f06f6170de linux/drivers/media/video/saa7185.c
--- a/linux/drivers/media/video/saa7185.c       Thu Feb 19 21:31:17 2009 +0100
+++ b/linux/drivers/media/video/saa7185.c       Thu Feb 19 21:41:19 2009 +0100
@@ -33,7 +33,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-chip-ident.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include "compat.h"
 
 MODULE_DESCRIPTION("Philips SAA7185 video encoder driver");
@@ -44,9 +44,11 @@ module_param(debug, int, 0);
 module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
 static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END };
 
 I2C_CLIENT_INSMOD;
+#endif
 
 /* ----------------------------------------------------------------------- */
 
@@ -296,11 +298,6 @@ static int saa7185_g_chip_ident(struct v
        return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_SAA7185, 0);
 }
 
-static int saa7185_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops saa7185_core_ops = {
@@ -377,8 +374,6 @@ MODULE_DEVICE_TABLE(i2c, saa7185_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "saa7185",
-       .driverid = I2C_DRIVERID_SAA7185B,
-       .command = saa7185_command,
        .probe = saa7185_probe,
        .remove = saa7185_remove,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
diff -r 6c37a40e3d05 -r 41f06f6170de linux/drivers/media/video/vpx3220.c
--- a/linux/drivers/media/video/vpx3220.c       Thu Feb 19 21:31:17 2009 +0100
+++ b/linux/drivers/media/video/vpx3220.c       Thu Feb 19 21:41:19 2009 +0100
@@ -27,7 +27,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-chip-ident.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include "compat.h"
 
 MODULE_DESCRIPTION("vpx3220a/vpx3216b/vpx3214c video decoder driver");
@@ -38,9 +38,11 @@ module_param(debug, int, 0);
 module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
 static unsigned short normal_i2c[] = { 0x86 >> 1, 0x8e >> 1, I2C_CLIENT_END };
 
 I2C_CLIENT_INSMOD;
+#endif
 
 #define VPX_TIMEOUT_COUNT  10
 
@@ -526,11 +528,6 @@ static int vpx3220_g_chip_ident(struct v
        return v4l2_chip_ident_i2c_client(client, chip, decoder->ident, 0);
 }
 
-static int vpx3220_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops vpx3220_core_ops = {
@@ -643,8 +640,6 @@ MODULE_DEVICE_TABLE(i2c, vpx3220_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "vpx3220",
-       .driverid = I2C_DRIVERID_VPX3220,
-       .command = vpx3220_command,
        .probe = vpx3220_probe,
        .remove = vpx3220_remove,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/41f06f6170de29b67997bedfee3610bf64fb34a3

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to