i2c: Add support for device alias names
Subsystems (7)
Based on earlier work by Jon Smirl and Jean Delvare.
This patch allows new-style i2c chip drivers to have alias names using the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this point, the old i2c driver binding scheme (driver_name/type) is still supported.
--- drivers/hwmon/f75375s.c | 21 ++++++++---- drivers/i2c/chips/ds1682.c | 3 +- drivers/i2c/chips/menelaus.c | 3 +- drivers/i2c/chips/tps65010.c | 3 +- drivers/i2c/chips/tsl2550.c | 3 +- drivers/i2c/i2c-core.c | 51 +++++++++++++++++++++++----- drivers/media/video/cs5345.c | 3 +- drivers/media/video/cs53l32a.c | 3 +- drivers/media/video/cx25840/cx25840-core.c | 3 +- drivers/media/video/ivtv/ivtv-i2c.c | 2 +- drivers/media/video/m52790.c | 3 +- drivers/media/video/msp3400-driver.c | 3 +- drivers/media/video/saa7115.c | 3 +- drivers/media/video/saa7127.c | 3 +- drivers/media/video/tlv320aic23b.c | 3 +- drivers/media/video/tuner-core.c | 3 +- drivers/media/video/tvaudio.c | 3 +- drivers/media/video/upd64031a.c | 3 +- drivers/media/video/upd64083.c | 3 +- drivers/media/video/v4l2-common.c | 5 ++- drivers/media/video/vp27smpx.c | 3 +- drivers/media/video/wm8739.c | 3 +- drivers/media/video/wm8775.c | 3 +- drivers/rtc/rtc-ds1307.c | 3 +- drivers/rtc/rtc-ds1374.c | 3 +- drivers/rtc/rtc-m41t80.c | 3 +- drivers/rtc/rtc-rs5c372.c | 3 +- include/linux/i2c.h | 5 +-- include/linux/mod_devicetable.h | 13 +++++++ include/media/v4l2-common.h | 4 ++- include/media/v4l2-i2c-drv-legacy.h | 2 +- include/media/v4l2-i2c-drv.h | 2 +- scripts/mod/file2alias.c | 13 +++++++ 33 files changed, 139 insertions(+), 48 deletions(-)
drivers/hwmon/f75375s.c +14 -7
@@ -117,7 +117,8 @@ struct f75375_data {static int f75375_attach_adapter (struct i2c_adapter *adapter);static int f75375_detect (struct i2c_adapter *adapter,int address,int kind);static int f75375_detach_client (struct i2c_client *client); -static int f75375_probe (struct i2c_client *client); +static int f75375_probe (struct i2c_client *client, +const struct i2c_device_id *id);static int f75375_remove (struct i2c_client *client);static struct i2c_driver f75375_legacy_driver = {
@@ -628,7 +629,8 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data, } -static int f75375_probe (struct i2c_client *client) +static int f75375_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct f75375_data *data =i2c_get_clientdata (client);struct f75375s_platform_data *f75375s_pdata = client->dev.platform_data;
@@ -637,7 +639,8 @@ static int f75375_probe(struct i2c_client *client)if (!i2c_check_functionality (client->adapter,I2C_FUNC_SMBUS_BYTE_DATA ))return -EIO ; -if (!(data =kzalloc (sizeof (struct f75375_data ),GFP_KERNEL ))) + data =kzalloc (sizeof (struct f75375_data ),GFP_KERNEL ); +if (!data)return -ENOMEM ;i2c_set_clientdata (client, data);
@@ -653,7 +656,8 @@ static int f75375_probe(struct i2c_client *client)return -ENODEV ; } -if ((err =sysfs_create_group (&client->dev.kobj, &f75375_group))) + err =sysfs_create_group (&client->dev.kobj, &f75375_group); +if (err) goto exit_free;if (data->kind == f75375) {
@@ -713,7 +717,8 @@ static int f75375_detect(struct i2c_adapter *adapter, int address, int kind)int err =0 ;const char *name ="" ; -if (!(client =kzalloc (sizeof (*client),GFP_KERNEL ))) { + client =kzalloc (sizeof (*client),GFP_KERNEL ); +if (!client) { err = -ENOMEM ; goto exit; }
@@ -745,10 +750,12 @@ static int f75375_detect(struct i2c_adapter *adapter, int address, int kind)dev_info (&adapter->dev,"found %s version: %02X\n" , name, version);strlcpy (client->name, name,I2C_NAME_SIZE ); -if ((err =i2c_attach_client (client))) + err =i2c_attach_client (client); +if (err) goto exit_free; -if ((err =f75375_probe (client)) <0 ) + err =f75375_probe (client,NULL ); +if (err <0 ) goto exit_detach;return 0 ;
drivers/i2c/chips/ds1682.c +2 -1
@@ -200,7 +200,8 @@ static struct bin_attribute ds1682_eeprom_attr = {/* * Called when a ds1682 device is matched with this driver */ -static int ds1682_probe (struct i2c_client *client) +static int ds1682_probe (struct i2c_client *client, +const struct i2c_device_id *id) {int rc;
drivers/i2c/chips/menelaus.c +2 -1
@@ -1149,7 +1149,8 @@ static inline void menelaus_rtc_init(struct menelaus_chip *m)static struct i2c_driver menelaus_i2c_driver; -static int menelaus_probe (struct i2c_client *client) +static int menelaus_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct menelaus_chip *menelaus;int rev =0 , val;
drivers/i2c/chips/tps65010.c +2 -1
@@ -465,7 +465,8 @@ static int __exit tps65010_remove(struct i2c_client *client)return 0 ; } -static int tps65010_probe (struct i2c_client *client) +static int tps65010_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct tps65010 *tps;int status;
drivers/i2c/chips/tsl2550.c +2 -1
@@ -364,7 +364,8 @@ static int tsl2550_init_client(struct i2c_client *client)*/ static struct i2c_driver tsl2550_driver; -static int __devinit tsl2550_probe (struct i2c_client *client) +static int __devinit tsl2550_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct i2c_adapter *adapter =to_i2c_adapter (client->dev.parent);struct tsl2550_data *data;
drivers/i2c/i2c-core.c +42 -9
101 lines not on this page · raw message
drivers/media/video/cs5345.c +2 -1
@@ -142,7 +142,8 @@ static int cs5345_command(struct i2c_client *client, unsigned cmd, void *arg)/* ----------------------------------------------------------------------- */ -static int cs5345_probe (struct i2c_client *client) +static int cs5345_probe (struct i2c_client *client, +const struct i2c_device_id *id) {/* Check if the adapter supports the needed features */ if (!i2c_check_functionality (client->adapter,I2C_FUNC_SMBUS_BYTE_DATA ))
drivers/media/video/cs53l32a.c +2 -1
@@ -135,7 +135,8 @@ static int cs53l32a_command(struct i2c_client *client, unsigned cmd, void *arg)* concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' */ -static int cs53l32a_probe (struct i2c_client *client) +static int cs53l32a_probe (struct i2c_client *client, +const struct i2c_device_id *id) {int i;
drivers/media/video/cx25840/cx25840-core.c +2 -1
@@ -1232,7 +1232,8 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd,/* ----------------------------------------------------------------------- */ -static int cx25840_probe (struct i2c_client *client) +static int cx25840_probe (struct i2c_client *client, +const struct i2c_device_id *did) {struct cx25840_state *state;u32 id;
drivers/media/video/ivtv/ivtv-i2c.c +1 -1
@@ -167,7 +167,7 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx)return -1 ; id = hw_driverids[idx];memset (&info,0 ,sizeof (info)); -strcpy (info.driver_name, hw_drivernames[idx]); +strcpy (info.type, hw_drivernames[idx]); info.addr = hw_addrs[idx];for (i =0 ; itv->i2c_clients[i] && i <I2C_CLIENTS_MAX ; i++) {}
drivers/media/video/m52790.c +2 -1
@@ -126,7 +126,8 @@ static int m52790_command(struct i2c_client *client, unsigned int cmd,/* i2c implementation */ -static int m52790_probe (struct i2c_client *client) +static int m52790_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct m52790_state *state;
drivers/media/video/msp3400-driver.c +2 -1
@@ -805,7 +805,8 @@ static int msp_resume(struct i2c_client *client)/* ----------------------------------------------------------------------- */ -static int msp_probe (struct i2c_client *client) +static int msp_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct msp_state *state;int (*thread_func)(void *data) =NULL ;
drivers/media/video/saa7115.c +2 -1
@@ -1450,7 +1450,8 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar/* ----------------------------------------------------------------------- */ -static int saa7115_probe (struct i2c_client *client) +static int saa7115_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct saa711x_state *state;int i;
drivers/media/video/saa7127.c +2 -1
@@ -661,7 +661,8 @@ static int saa7127_command(struct i2c_client *client,/* ----------------------------------------------------------------------- */ -static int saa7127_probe (struct i2c_client *client) +static int saa7127_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct saa7127_state *state;struct v4l2_sliced_vbi_data vbi = {0 ,0 ,0 ,0 };/* set to disabled */
drivers/media/video/tlv320aic23b.c +2 -1
@@ -125,7 +125,8 @@ static int tlv320aic23b_command(struct i2c_client *client,* concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' */ -static int tlv320aic23b_probe (struct i2c_client *client) +static int tlv320aic23b_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct tlv320aic23b_state *state;
drivers/media/video/tuner-core.c +2 -1
@@ -1074,7 +1074,8 @@ static void tuner_lookup(struct i2c_adapter *adap,/* During client attach, set_type is called by adapter's attach_inform callback. set_type must then be completed by tuner_probe. */ -static int tuner_probe (struct i2c_client *client) +static int tuner_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct tuner *t;struct tuner *radio;
drivers/media/video/tvaudio.c +2 -1
@@ -1461,7 +1461,8 @@ static struct CHIPDESC chiplist[] = {/* ---------------------------------------------------------------------- */ /* i2c registration */ -static int chip_probe (struct i2c_client *client) +static int chip_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct CHIPSTATE *chip;struct CHIPDESC *desc;
drivers/media/video/upd64031a.c +2 -1
@@ -195,7 +195,8 @@ static int upd64031a_command(struct i2c_client *client, unsigned cmd, void *arg)/* i2c implementation */ -static int upd64031a_probe (struct i2c_client *client) +static int upd64031a_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct upd64031a_state *state;int i;
drivers/media/video/upd64083.c +2 -1
@@ -172,7 +172,8 @@ static int upd64083_command(struct i2c_client *client, unsigned cmd, void *arg)/* i2c implementation */ -static int upd64083_probe (struct i2c_client *client) +static int upd64083_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct upd64083_state *state;int i;
drivers/media/video/v4l2-common.c +3 -2
@@ -710,7 +710,8 @@ EXPORT_SYMBOL(v4l2_chip_ident_i2c_client);/* Helper function for I2C legacy drivers */ int v4l2_i2c_attach (struct i2c_adapter *adapter,int address,struct i2c_driver *driver, -const char *name,int (*probe)(struct i2c_client *)) +const char *name,int (*probe)(struct i2c_client *, +const struct i2c_device_id *id)) {struct i2c_client *client;int err;
@@ -724,7 +725,7 @@ int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver client->driver = driver;strlcpy (client->name, name,sizeof (client->name)); - err =probe (client); + err =probe (client,NULL );if (err ==0 ) {i2c_attach_client (client); }else {
drivers/media/video/vp27smpx.c +2 -1
@@ -121,7 +121,8 @@ static int vp27smpx_command(struct i2c_client *client, unsigned cmd, void *arg)* concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' */ -static int vp27smpx_probe (struct i2c_client *client) +static int vp27smpx_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct vp27smpx_state *state;
drivers/media/video/wm8739.c +2 -1
@@ -261,7 +261,8 @@ static int wm8739_command(struct i2c_client *client, unsigned cmd, void *arg)/* i2c implementation */ -static int wm8739_probe (struct i2c_client *client) +static int wm8739_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct wm8739_state *state;
drivers/media/video/wm8775.c +2 -1
@@ -159,7 +159,8 @@ static int wm8775_command(struct i2c_client *client, unsigned cmd, void *arg)* concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' */ -static int wm8775_probe (struct i2c_client *client) +static int wm8775_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct wm8775_state *state;
drivers/rtc/rtc-ds1307.c +2 -1
@@ -326,7 +326,8 @@ static struct bin_attribute nvram = {static struct i2c_driver ds1307_driver; -static int __devinit ds1307_probe (struct i2c_client *client) +static int __devinit ds1307_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct ds1307 *ds1307;int err = -ENODEV ;
drivers/rtc/rtc-ds1374.c +2 -1
@@ -355,7 +355,8 @@ static const struct rtc_class_ops ds1374_rtc_ops = { .ioctl = ds1374_ioctl, }; -static int ds1374_probe (struct i2c_client *client) +static int ds1374_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct ds1374 *ds1374;int ret;
drivers/rtc/rtc-m41t80.c +2 -1
@@ -756,7 +756,8 @@ static struct notifier_block wdt_notifier = {* ***************************************************************************** */ -static int m41t80_probe (struct i2c_client *client) +static int m41t80_probe (struct i2c_client *client, +const struct i2c_device_id *id) {int i, rc =0 ;struct rtc_device *rtc =NULL ;
drivers/rtc/rtc-rs5c372.c +2 -1
@@ -494,7 +494,8 @@ static void rs5c_sysfs_unregister(struct device *dev)static struct i2c_driver rs5c372_driver; -static int rs5c372_probe (struct i2c_client *client) +static int rs5c372_probe (struct i2c_client *client, +const struct i2c_device_id *id) {int err =0 ;struct rs5c372 *rs5c372;
include/linux/i2c.h +2 -3
@@ -126,7 +126,7 @@ struct i2c_driver {* With the driver model, device enumeration is NEVER done by drivers; * it's done by infrastructure. (NEW STYLE DRIVERS ONLY) */ -int (*probe)(struct i2c_client *); +int (*probe)(struct i2c_client *,const struct i2c_device_id *id);int (*remove)(struct i2c_client *);/* driver model interfaces that don't relate to enumeration */
@@ -140,11 +140,10 @@ struct i2c_driver {int (*command)(struct i2c_client *client,unsigned int cmd,void *arg);struct device_driver driver; +const struct i2c_device_id *id_table; };#define to_i2c_driver (d) container_of(d, struct i2c_driver, driver) -#define I2C_NAME_SIZE 20 -/** * struct i2c_client - represent an I2C slave device * @flags: I2C_CLIENT_TEN indicates the device uses a ten bit chip address;
include/linux/mod_devicetable.h +13 -0
@@ -368,4 +368,17 @@ struct virtio_device_id { };#define VIRTIO_DEV_ANY_ID 0xffffffff +/* i2c */ + +/* These defines are used to separate PowerPC open firmware +* drivers into their own namespace */ +#define I2C_NAME_SIZE 20 +#define I2C_MODULE_PREFIX "i2c:" + +struct i2c_device_id { +char name[I2C_NAME_SIZE ]; +kernel_ulong_t driver_data;/* Data private to the driver */ +}; + +#endif /* LINUX_MOD_DEVICETABLE_H */
include/media/v4l2-common.h +3 -1
@@ -107,9 +107,11 @@ int v4l2_chip_match_host(u32 id_type, u32 chip_id);struct i2c_driver ;struct i2c_adapter ;struct i2c_client ; +struct i2c_device_id ;int v4l2_i2c_attach (struct i2c_adapter *adapter,int address,struct i2c_driver *driver, -const char *name,int (*probe)(struct i2c_client *)); +const char *name,int (*probe)(struct i2c_client *, +const struct i2c_device_id *id));/* ------------------------------------------------------------------------- */
include/media/v4l2-i2c-drv-legacy.h +1 -1
@@ -25,7 +25,7 @@ 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); +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);
include/media/v4l2-i2c-drv.h +1 -1
@@ -30,7 +30,7 @@ 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); +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);
scripts/mod/file2alias.c +13 -0
@@ -543,6 +543,15 @@ static int do_virtio_entry(const char *filename, struct virtio_device_id *id,return 1 ; } +/* Looks like: i2c:S */ +static int do_i2c_entry (const char *filename,struct i2c_device_id *id, +char *alias) +{ +sprintf (alias,I2C_MODULE_PREFIX "%s" , id->name); + +return 1 ; +} +/* Ignore any prefix, eg. v850 prepends _ */ static inline int sym_is (const char *symbol,const char *name) {
@@ -673,6 +682,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,do_table (symval, sym->st_size,sizeof (struct virtio_device_id ),"virtio" , do_virtio_entry, mod); + else if (sym_is(symname, "__mod_i2c_device_table")) + do_table(symval, sym->st_size, + sizeof(struct i2c_device_id), "i2c", + do_i2c_entry, mod);free (zeros ); }
Signature · 1 line
1.5.4.5
Hi Jochen,
Quoted 105 lines · Jochen Friedrich
Based on earlier work by Jon Smirl and Jean Delvare.
This patch allows new-style i2c chip drivers to have alias names using the official kernel aliasing system and
MODULE_DEVICE_TABLE(). At this point, the old i2c driver binding scheme (driver_name/type) is still supported.Signed-off-by Jochen Friedrich <[email protected]>Cc Jean Delvare <[email protected]>Cc Jon Smirl <[email protected]>--- drivers/hwmon/f75375s.c | 21 ++++++++---- drivers/i2c/chips/ds1682.c | 3 +- drivers/i2c/chips/menelaus.c | 3 +- drivers/i2c/chips/tps65010.c | 3 +- drivers/i2c/chips/tsl2550.c | 3 +- drivers/i2c/i2c-core.c | 51 +++++++++++++++++++++++----- drivers/media/video/cs5345.c | 3 +- drivers/media/video/cs53l32a.c | 3 +- drivers/media/video/cx25840/cx25840-core.c | 3 +- drivers/media/video/ivtv/ivtv-i2c.c | 2 +- drivers/media/video/m52790.c | 3 +- drivers/media/video/msp3400-driver.c | 3 +- drivers/media/video/saa7115.c | 3 +- drivers/media/video/saa7127.c | 3 +- drivers/media/video/tlv320aic23b.c | 3 +- drivers/media/video/tuner-core.c | 3 +- drivers/media/video/tvaudio.c | 3 +- drivers/media/video/upd64031a.c | 3 +- drivers/media/video/upd64083.c | 3 +- drivers/media/video/v4l2-common.c | 5 ++- drivers/media/video/vp27smpx.c | 3 +- drivers/media/video/wm8739.c | 3 +- drivers/media/video/wm8775.c | 3 +- drivers/rtc/rtc-ds1307.c | 3 +- drivers/rtc/rtc-ds1374.c | 3 +- drivers/rtc/rtc-m41t80.c | 3 +- drivers/rtc/rtc-rs5c372.c | 3 +- include/linux/i2c.h | 5 +-- include/linux/mod_devicetable.h | 13 +++++++ include/media/v4l2-common.h | 4 ++- include/media/v4l2-i2c-drv-legacy.h | 2 +- include/media/v4l2-i2c-drv.h | 2 +- scripts/mod/file2alias.c | 13 +++++++ 33 files changed, 139 insertions(+), 48 deletions(-)drivers/hwmon/f75375s.c +10
-6@@ -117,7 +117,8 @@ struct f75375_data {static int f75375_attach_adapter (struct i2c_adapter *adapter);static int f75375_detect (struct i2c_adapter *adapter,int address,int kind);static int f75375_detach_client (struct i2c_client *client); -static int f75375_probe (struct i2c_client *client); +static int f75375_probe (struct i2c_client *client, +const struct i2c_device_id *id);static int f75375_remove (struct i2c_client *client);static struct i2c_driver f75375_legacy_driver = {@@ -628,7 +629,8 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data, } -static int f75375_probe (struct i2c_client *client) +static int f75375_probe (struct i2c_client *client, +const struct i2c_device_id *id) {struct f75375_data *data =i2c_get_clientdata (client);struct f75375s_platform_data *f75375s_pdata = client->dev.platform_data;@@ -637,7 +639,8 @@ static int f75375_probe(struct i2c_client *client)if (!i2c_check_functionality (client->adapter,I2C_FUNC_SMBUS_BYTE_DATA ))return -EIO ; -if (!(data =kzalloc (sizeof (struct f75375_data ),GFP_KERNEL ))) + data =kzalloc (sizeof (struct f75375_data ),GFP_KERNEL ); +if (!data)return -ENOMEM ;i2c_set_clientdata (client, data);@@ -653,7 +656,8 @@ static int f75375_probe(struct i2c_client *client)return -ENODEV ; } -if ((err =sysfs_create_group (&client->dev.kobj, &f75375_group))) + err =sysfs_create_group (&client->dev.kobj, &f75375_group); +if (err) goto exit_free;if (data->kind == f75375) {@@ -713,7 +717,8 @@ static int f75375_detect(struct i2c_adapter *adapter, int address, int kind)int err =0 ;const char *name ="" ; -if (!(client =kzalloc (sizeof (*client),GFP_KERNEL ))) { + client =kzalloc (sizeof (*client),GFP_KERNEL ); +if (!client) { err = -ENOMEM ; goto exit; }@@ -745,10 +750,12 @@ static int f75375_detect(struct i2c_adapter *adapter, int address, int kind)dev_info (&adapter->dev,"found %s version: %02X\n" , name, version);strlcpy (client->name, name,I2C_NAME_SIZE ); -if ((err =i2c_attach_client (client)))
drivers/hwmon/f75375s.c static int f75375_detect(struct i2c_adapter *adapter, int address, int kind) · line 761
Quoted 10 lines
drivers/hwmon/f75375s.c +4
-1+ err =i2c_attach_client (client); +if (err) goto exit_free; -if ((err =f75375_probe (client)) <0 ) + err =f75375_probe (client,NULL ); +if (err <0 ) goto exit_detach;return 0 ;
These coding style cleanups don't belong to this patch (if they belong anywhere - I don't much see the point)
Quoted 6 lines
(...)
drivers/media/video/ivtv/ivtv-i2c.c +0
-0
drivers/media/video/ivtv/ivtv-i2c.c int ivtv_i2c_register(struct ivtv *itv, unsigned idx) · line 173
Quoted 8 lines
drivers/media/video/ivtv/ivtv-i2c.c +1
-1@@ -167,7 +167,7 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx)return -1 ; id = hw_driverids[idx];memset (&info,0 ,sizeof (info)); -strcpy (info.driver_name, hw_drivernames[idx]); +strcpy (info.type, hw_drivernames[idx]); info.addr = hw_addrs[idx];for (i =0 ; itv->i2c_clients[i] && i <I2C_CLIENTS_MAX ; i++) {}
This change should not be included in this patch. At this point, the old binding model is still available, and I believe that the change above will break ivtv, because all the device drivers it needs are still using the old binding model (they don't define i2c device IDs yet.)
For the rest, there are a number of drivers which are missing:
drivers/gpio/pca953x.cdrivers/gpio/pcf857x.cdrivers/media/video/mt9m001.cdrivers/media/video/mt9v022.cdrivers/media/video/saa717x.cdrivers/media/video/tcm825x.cdrivers/rtc/rtc-s35390a.c
Either you missed them, or they were added after you updated the patch. Either way, they need to be added. I hope I didn't miss any, it's hard to make sure as some of them won't build on my development system (x86-64).
Oh, and Documentation/i2c/writing-clients needs to be updated, too.
I'll add the missing chunks tomorrow, then I'll post an updated patch, after I'm done with checking the 2nd patch of the set. I might leave ivtv alone for the time being, as it's a complex one and I don't want to break it for rc1.
Signature · 1 line
Jean Delvare
Hi Jean,
Quoted 9 lines
drivers/hwmon/f75375s.c static int f75375_detect(struct i2c_adapter *adapter, int address, int kind) · line 761
Quoted 6 lines
drivers/hwmon/f75375s.c +2
-1-if ((err =f75375_probe (client)) <0 ) + err =f75375_probe (client,NULL ); +if (err <0 ) goto exit_detach;return 0 ;These coding style cleanups don't belong to this patch (if they belong anywhere - I don't much see the point)
I just wanted to make sure, scripts/checkpatch.pl doesn't complain. But you're right. The coding style cleanup should have been another patch.
Thanks a lot for your efforts of getting the alias stuff in!
Jochen