From 60b129d7bfa3e20450816983bd52c49bb0bc1c21 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sun, 11 May 2008 20:37:06 +0200 Subject: i2c: Match dummy devices by type As the old driver_name/type matching scheme is going away soon, change the dummy device mechanism to use the new matching scheme. This has the downside that dummy i2c clients can no longer choose their name, they'll all appear as "dummy" in sysfs and in log messages. I don't think it is a problem in practice though, as there is little reason to use these i2c clients to log messages. Signed-off-by: Jean Delvare --- include/linux/i2c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/i2c.h b/include/linux/i2c.h index cb63da5c213..6716ec808c5 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -262,7 +262,7 @@ i2c_new_probed_device(struct i2c_adapter *adap, * client handles for the extra addresses. */ extern struct i2c_client * -i2c_new_dummy(struct i2c_adapter *adap, u16 address, const char *type); +i2c_new_dummy(struct i2c_adapter *adap, u16 address); extern void i2c_unregister_device(struct i2c_client *); -- cgit v1.2.3 From ae429083efe996ca2c569c44fd6fea440676dc33 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sun, 11 May 2008 20:37:06 +0200 Subject: i2c: Convert some more new-style drivers to use module aliasing Update 3 more new-style i2c drivers to use standard module aliasing instead of the old driver_name/type driver matching scheme. These video drivers aren't used yet so converting them is trivial. Signed-off-by: Jean Delvare --- include/media/v4l2-i2c-drv-legacy.h | 2 ++ include/media/v4l2-i2c-drv.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/media/v4l2-i2c-drv-legacy.h b/include/media/v4l2-i2c-drv-legacy.h index 347b6f8beb2..878562278b6 100644 --- a/include/media/v4l2-i2c-drv-legacy.h +++ b/include/media/v4l2-i2c-drv-legacy.h @@ -31,6 +31,7 @@ struct v4l2_i2c_driver_data { int (*resume)(struct i2c_client *client); int (*legacy_probe)(struct i2c_adapter *adapter); int legacy_class; + const struct i2c_device_id *id_table; }; static struct v4l2_i2c_driver_data v4l2_i2c_data; @@ -124,6 +125,7 @@ static int __init v4l2_i2c_drv_init(void) v4l2_i2c_driver.command = v4l2_i2c_data.command; v4l2_i2c_driver.probe = v4l2_i2c_data.probe; v4l2_i2c_driver.remove = v4l2_i2c_data.remove; + v4l2_i2c_driver.id_table = v4l2_i2c_data.id_table; err = i2c_add_driver(&v4l2_i2c_driver); if (err) i2c_del_driver(&v4l2_i2c_driver_legacy); diff --git a/include/media/v4l2-i2c-drv.h b/include/media/v4l2-i2c-drv.h index 7b6f06be795..40ecef29801 100644 --- a/include/media/v4l2-i2c-drv.h +++ b/include/media/v4l2-i2c-drv.h @@ -36,6 +36,7 @@ struct v4l2_i2c_driver_data { int (*resume)(struct i2c_client *client); int (*legacy_probe)(struct i2c_adapter *adapter); int legacy_class; + const struct i2c_device_id *id_table; }; static struct v4l2_i2c_driver_data v4l2_i2c_data; @@ -53,6 +54,7 @@ static int __init v4l2_i2c_drv_init(void) v4l2_i2c_driver.remove = v4l2_i2c_data.remove; v4l2_i2c_driver.suspend = v4l2_i2c_data.suspend; v4l2_i2c_driver.resume = v4l2_i2c_data.resume; + v4l2_i2c_driver.id_table = v4l2_i2c_data.id_table; return i2c_add_driver(&v4l2_i2c_driver); } -- cgit v1.2.3