summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-17 15:37:03 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-07-17 15:37:03 +0200
commite52d2de8a0a347bfffa821dee2919bcef6ce5b39 (patch)
tree4388a7d96ff9bf2baad8e3259bee957d39c29044 /linux
parent2c7b258f67fb335ae925e6fe175a9f63ed7db1f4 (diff)
downloadmediapointer-dvb-s2-e52d2de8a0a347bfffa821dee2919bcef6ce5b39.tar.gz
mediapointer-dvb-s2-e52d2de8a0a347bfffa821dee2919bcef6ce5b39.tar.bz2
mt9m001/saa7127: fix 2.6.25 kernel build warning/error.
From: Hans Verkuil <hverkuil@xs4all.nl> Allow these to build for kernels < 2.6.26. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/mt9m001.c4
-rw-r--r--linux/drivers/media/video/saa7127.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/linux/drivers/media/video/mt9m001.c b/linux/drivers/media/video/mt9m001.c
index 089ce311f..94709f05c 100644
--- a/linux/drivers/media/video/mt9m001.c
+++ b/linux/drivers/media/video/mt9m001.c
@@ -617,8 +617,12 @@ static void mt9m001_video_remove(struct soc_camera_device *icd)
soc_camera_video_stop(&mt9m001->icd);
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
static int mt9m001_probe(struct i2c_client *client,
const struct i2c_device_id *did)
+#else
+static int mt9m001_probe(struct i2c_client *client)
+#endif
{
struct mt9m001 *mt9m001;
struct soc_camera_device *icd;
diff --git a/linux/drivers/media/video/saa7127.c b/linux/drivers/media/video/saa7127.c
index 7b146fbb9..ca88dd325 100644
--- a/linux/drivers/media/video/saa7127.c
+++ b/linux/drivers/media/video/saa7127.c
@@ -719,9 +719,12 @@ static int saa7127_probe(struct i2c_client *client,
saa7127_set_input_type(client, SAA7127_INPUT_TYPE_NORMAL);
saa7127_set_video_enable(client, 1);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
if (id->driver_data) { /* Chip type is already known */
state->ident = id->driver_data;
- } else { /* Needs detection */
+ } else /* Needs detection */
+#endif
+ {
int read_result;
/* Detect if it's an saa7129 */