From 9923a498d023c4ea6798835f3e74ae33e8c07f69 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 30 Oct 2008 14:57:14 +0100 Subject: ov772x: fix compilation for pre-2.6.26 kernels From: Hans Verkuil Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/ov772x.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/ov772x.c b/linux/drivers/media/video/ov772x.c index 6206dff8d..2ddc2ab70 100644 --- a/linux/drivers/media/video/ov772x.c +++ b/linux/drivers/media/video/ov772x.c @@ -874,9 +874,12 @@ static struct soc_camera_ops ov772x_ops = { * i2c_driver function */ -static int ov772x_probe(struct i2c_client *client, - const struct i2c_device_id *did) - +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) +static int ov772x_probe(struct i2c_client *client) +#else +static int ov772x_probe(struct i2c_client *client, + const struct i2c_device_id *did) +#endif { struct ov772x_priv *priv; struct ov772x_camera_info *info; @@ -927,12 +930,13 @@ static int ov772x_remove(struct i2c_client *client) return 0; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) static const struct i2c_device_id ov772x_id[] = { {"ov772x", 0}, { } }; MODULE_DEVICE_TABLE(i2c, ov772x_id); - +#endif static struct i2c_driver ov772x_i2c_driver = { .driver = { @@ -940,7 +944,9 @@ static struct i2c_driver ov772x_i2c_driver = { }, .probe = ov772x_probe, .remove = ov772x_remove, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = ov772x_id, +#endif }; /* -- cgit v1.2.3