Re: [PATCH] i2c: Switch to using the new API kobj_to_dev()

2020-09-21 Thread Wolfram Sang
On Tue, Sep 15, 2020 at 09:38:18AM +0800, Tian Tao wrote: > Switch to using the new API kobj_to_dev(). > > Signed-off-by: Tian Tao Applied to for-next, thanks! signature.asc Description: PGP signature

Re: [PATCH] i2c: Switch to using the new API kobj_to_dev()

2020-09-19 Thread wsa
On Sat, Sep 19, 2020 at 09:01:12AM +0800, tiantao (H) wrote: > > > 在 2020/9/19 5:09, w...@kernel.org 写道: > > > > > static inline struct i2c_client *kobj_to_i2c_client(struct kobject > > > *kobj) > > > { > > > - struct device * const dev = container_of(kobj, struct device, kobj); > > > +

Re: [PATCH] i2c: Switch to using the new API kobj_to_dev()

2020-09-18 Thread tiantao (H)
在 2020/9/19 5:09, w...@kernel.org 写道: static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) { - struct device * const dev = container_of(kobj, struct device, kobj); + struct device * const dev = kobj_to_dev(kobj); return to_i2c_client(dev);

Re: [PATCH] i2c: Switch to using the new API kobj_to_dev()

2020-09-18 Thread wsa
> static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) > { > - struct device * const dev = container_of(kobj, struct device, kobj); > + struct device * const dev = kobj_to_dev(kobj); > return to_i2c_client(dev); Can't we make this a oneliner then merging the

[PATCH] i2c: Switch to using the new API kobj_to_dev()

2020-09-14 Thread Tian Tao
Switch to using the new API kobj_to_dev(). Signed-off-by: Tian Tao --- include/linux/i2c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index fc55ea4..5662265 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -344,7