mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
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 <khali@linux-fr.org>
This commit is contained in:
parent
60b129d7bf
commit
ae429083ef
5 changed files with 29 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue