summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa717x.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/saa717x.c')
-rw-r--r--linux/drivers/media/video/saa717x.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/linux/drivers/media/video/saa717x.c b/linux/drivers/media/video/saa717x.c
index 98e0ec245..a478bf25e 100644
--- a/linux/drivers/media/video/saa717x.c
+++ b/linux/drivers/media/video/saa717x.c
@@ -47,11 +47,7 @@ MODULE_AUTHOR("K. Ohta, T. Adachi, Hans Verkuil");
MODULE_LICENSE("GPL");
static int debug;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
module_param(debug, int, 0644);
-#else
-MODULE_PARM(debug, "i");
-#endif
MODULE_PARM_DESC(debug, "Debug level (0-1)");
/*
@@ -60,9 +56,6 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)");
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
static unsigned short normal_i2c[] = { 0x42 >> 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;
#endif
@@ -1442,8 +1435,9 @@ static int saa717x_probe(struct i2c_client *client,
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
return -EIO;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
snprintf(client->name, sizeof(client->name) - 1, "saa717x");
-
+#endif
if (saa717x_write(client, 0x5a4, 0xfe) &&
saa717x_write(client, 0x5a5, 0x0f) &&
saa717x_write(client, 0x5a6, 0x00) &&
@@ -1520,16 +1514,22 @@ static int saa717x_remove(struct i2c_client *client)
/* ----------------------------------------------------------------------- */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+static const struct i2c_device_id saa717x_id[] = {
+ { "saa717x", 0 },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, saa717x_id);
+
+#endif
static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.name = "saa717x",
.driverid = I2C_DRIVERID_SAA717X,
.command = saa717x_command,
.probe = saa717x_probe,
.remove = saa717x_remove,
-#ifdef I2C_CLASS_TV_ANALOG
.legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+ .id_table = saa717x_id,
#endif
};
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
-EXPORT_NO_SYMBOLS;
-#endif