Hi,
On Sat, Jun 08, 2019 at 12:55:39PM +0200, Wolfram Sang wrote:
> While preparing a refactoring series, I noticed that some drivers use a
> complicated way of determining the adapter of a client. The easy way is
> to use the intended pointer: client->adapter
>
> These drivers do:
> to_i2c
Hi Peter,
> Similar things go on in:
>
> drivers/hwmon/lm90.c
> drivers/leds/leds-is31fl319x.c
> drivers/of/unittest.c
Right. I'll fix them, too.
> And drivers/rtc/rtc-fm3130.c has a couple of these:
These are fixed in patch 26 of this series.
Thanks and happy hacking,
Wolfram
signature
On 2019-06-08 12:55, Wolfram Sang wrote:
> While preparing a refactoring series, I noticed that some drivers use a
> complicated way of determining the adapter of a client. The easy way is
> to use the intended pointer: client->adapter
>
> These drivers do:
> to_i2c_adapter(client->dev.paren
While preparing a refactoring series, I noticed that some drivers use a
complicated way of determining the adapter of a client. The easy way is
to use the intended pointer: client->adapter
These drivers do:
to_i2c_adapter(client->dev.parent);
The I2C core populates the parent pointer as: