lkml.org 
[lkml]   [2020]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i2c: Switch to using the new API kobj_to_dev()

> 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?

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-09-18 23:09    [W:0.048 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site