summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa717x.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-06-05 10:24:54 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-06-05 10:24:54 -0300
commitf46a3bb02f6dbc621fcbb41bf346ef37d5cc4502 (patch)
treebb4b0aa5e201bf8bc73be68df98a9d78367ab1f1 /linux/drivers/media/video/saa717x.c
parent7339e3ef64dd5b2f08b23d60447ea48cb52108e5 (diff)
parent2a79e6ad21afbacd47657490937dfae88775f6f1 (diff)
downloadmediapointer-dvb-s2-f46a3bb02f6dbc621fcbb41bf346ef37d5cc4502.tar.gz
mediapointer-dvb-s2-f46a3bb02f6dbc621fcbb41bf346ef37d5cc4502.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/bug-fix
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/saa717x.c')
-rw-r--r--linux/drivers/media/video/saa717x.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/linux/drivers/media/video/saa717x.c b/linux/drivers/media/video/saa717x.c
index 98e0ec245..adcc7adc5 100644
--- a/linux/drivers/media/video/saa717x.c
+++ b/linux/drivers/media/video/saa717x.c
@@ -1442,8 +1442,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,6 +1521,14 @@ 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,
@@ -1529,6 +1538,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
#ifdef I2C_CLASS_TV_ANALOG
.legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL,
#endif
+#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;