Re: [PATCH] regulator: fan53555: Simplify probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 26, 2023 at 06:24:58PM +0100, Biju Das wrote:
> Simplify probe() by replacing of_device_get_match_data() and ID lookup for
> retrieving match data by i2c_get_match_data().

...

> +	di->vendor = (unsigned long)i2c_get_match_data(client);

Use standard casting for this type of conversions.

...


> +	if (!client->dev.of_node) {

Why?

Note, we discourage dereference of of_node or fwnode from struct device. We
have APIs for this (in case it's even needed).

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux