[i2c] i2c-remove-redundant-i2c_client-list.patch
Jean Delvare
khali at linux-fr.org
Tue Jan 8 15:21:59 CET 2008
On Sun, 6 Jan 2008 11:43:33 -0800, David Brownell wrote:
> Remove further duplication between i2c core and driver model: the
> per-adapter list of clients (adapter->clients, client->list) and
> its lock (adapter->clist_lock) duplicate adapter->dev.children.
>
> Add and use a new i2c_verify_client() routine to help code which
> traverses the driver model tree.
>
> Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
> ---
> LIGHTLY TESTED ... goes on top of two patches from Jean's I2C queue,
>
> i2c-remove-redundant-i2c_adapter-list.patch
> i2c-remove-redundant-i2c_driver-list.patch
>
> Updated per Jean's comments. (Note that the i2c_verify_client
> bit might usefully be split out into a separate patch, to simplify
> converting the V4L code that uses this i2c client list.)
Agreed, I'll split things up as needed so that we have a clean
incremental patch set.
> (...)
> static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
> {
> - struct device * const dev = container_of(kobj, struct device, kobj);
> - return to_i2c_client(dev);
> + return i2c_verify_client(container_of(kobj, struct device, kobj));
> }
Unless you have a reason to think that this is really needed, I think
I'll back this change out as explained in my previous post. All the
rest looks just fine to me, thanks!
--
Jean Delvare
More information about the i2c
mailing list