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

From: wsa
Date: Fri Sep 18 2020 - 17:09:16 EST



> 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 last two lines?

Attachment: signature.asc
Description: PGP signature