diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-30 00:40:01 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-30 00:40:01 +0200 |
commit | 221b2e5d87ca670a9b764323c59445f1b6e3df27 (patch) | |
tree | 403172fe559abb1c7fddb3944ba45632472d15a5 | |
parent | 0811e7462ce5c70637faa77e010016680c1e971a (diff) | |
download | mediapointer-dvb-s2-221b2e5d87ca670a9b764323c59445f1b6e3df27.tar.gz mediapointer-dvb-s2-221b2e5d87ca670a9b764323c59445f1b6e3df27.tar.bz2 |
v4l2: remove legacy fields in v4l2-i2c-drv.h.
From: Hans Verkuil <hverkuil@xs4all.nl>
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r-- | linux/drivers/media/video/saa7115.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 2 | ||||
-rw-r--r-- | linux/include/media/v4l2-i2c-drv.h | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c index f4f624583..a5ae39f35 100644 --- a/linux/drivers/media/video/saa7115.c +++ b/linux/drivers/media/video/saa7115.c @@ -1686,7 +1686,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "saa7115", .probe = saa711x_probe, .remove = saa711x_remove, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = saa7115_id, #endif diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index ab1eb58ea..6e7ea623b 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -1044,7 +1044,7 @@ static void tuner_lookup(struct i2c_adapter *adap, int mode_mask; if (pos->i2c->adapter != adap || - pos->i2c->driver->id != I2C_DRIVERID_TUNER) + strcmp(pos->i2c->driver->driver.name, "tuner")) continue; mode_mask = pos->mode_mask & ~T_STANDBY; diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h index 8279d07e3..38a26fc73 100644 --- a/linux/include/media/v4l2-i2c-drv.h +++ b/linux/include/media/v4l2-i2c-drv.h @@ -39,14 +39,15 @@ struct v4l2_i2c_driver_data { const char * const name; - int driverid; int (*command)(struct i2c_client *client, unsigned int cmd, void *arg); int (*probe)(struct i2c_client *client, const struct i2c_device_id *id); int (*remove)(struct i2c_client *client); int (*suspend)(struct i2c_client *client, pm_message_t state); int (*resume)(struct i2c_client *client); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) int (*legacy_probe)(struct i2c_adapter *adapter); int legacy_class; +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) const struct i2c_device_id *id_table; #endif @@ -68,7 +69,6 @@ static int compat_legacy_probe(struct i2c_client *client) static int __init v4l2_i2c_drv_init(void) { v4l2_i2c_driver.driver.name = v4l2_i2c_data.name; - v4l2_i2c_driver.id = v4l2_i2c_data.driverid; v4l2_i2c_driver.command = v4l2_i2c_data.command; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) v4l2_i2c_driver.probe = v4l2_i2c_data.probe; @@ -172,7 +172,6 @@ static int __init v4l2_i2c_drv_init(void) v4l2_i2c_data.legacy_class = I2C_CLASS_TV_ANALOG; v4l2_i2c_driver.driver.name = v4l2_i2c_data.name; - v4l2_i2c_driver.id = v4l2_i2c_data.driverid; v4l2_i2c_driver.command = v4l2_i2c_data.command; return i2c_add_driver(&v4l2_i2c_driver); } |