summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/m52790.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-07-09 22:42:07 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-09 22:42:07 -0300
commit06baaa0441c7fec2a211ddf7c502f837cd988132 (patch)
tree284236ae49b1385a091119cf7b3520bc7d64552a /linux/drivers/media/video/m52790.c
parente5561cf14fe189f7f0d726a1c66ffa992354ab2d (diff)
parentd784aba6717da44bfef18007146f6d00280e39fe (diff)
downloadmediapointer-dvb-s2-06baaa0441c7fec2a211ddf7c502f837cd988132.tar.gz
mediapointer-dvb-s2-06baaa0441c7fec2a211ddf7c502f837cd988132.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/fusionhdtv7
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/m52790.c')
-rw-r--r--linux/drivers/media/video/m52790.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/linux/drivers/media/video/m52790.c b/linux/drivers/media/video/m52790.c
index 6cca77680..87e948caf 100644
--- a/linux/drivers/media/video/m52790.c
+++ b/linux/drivers/media/video/m52790.c
@@ -31,10 +31,6 @@
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/v4l2-i2c-drv.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
-#include "i2c-compat.h"
-#include <linux/slab.h>
-#endif
#include "compat.h"
MODULE_DESCRIPTION("i2c device driver for m52790 A/V switch");
@@ -44,10 +40,6 @@ MODULE_LICENSE("GPL");
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
static unsigned short normal_i2c[] = { 0x90 >> 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
@@ -149,8 +141,10 @@ static int m52790_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, "m52790");
+#endif
v4l_info(client, "chip found @ 0x%x (%s)\n",
client->addr << 1, client->adapter->name);
@@ -173,14 +167,21 @@ static int m52790_remove(struct i2c_client *client)
/* ----------------------------------------------------------------------- */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+static const struct i2c_device_id m52790_id[] = {
+ { "m52790", 0 },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, m52790_id);
+
+#endif
static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.name = "m52790",
.driverid = I2C_DRIVERID_M52790,
.command = m52790_command,
.probe = m52790_probe,
.remove = m52790_remove,
-};
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
-EXPORT_NO_SYMBOLS;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+ .id_table = m52790_id,
#endif
+};