Re: [PATCH] gpio: pca953x: Use i2c_get_match_data()

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

 



On Sat, Aug 19, 2023 at 06:37:47PM +0100, Biju Das wrote:
> Replace device_get_match_data() and id lookup for retrieving match data
> by i2c_get_match_data().

...

> -	if (i2c_id) {
> -		chip->driver_data = i2c_id->driver_data;
> -	} else {
> -		const void *match;
> -
> -		match = device_get_match_data(&client->dev);
> -		if (!match) {
> -			ret = -ENODEV;
> -			goto err_exit;
> -		}
> -
> -		chip->driver_data = (uintptr_t)match;
> +	chip->driver_data = (uintptr_t)i2c_get_match_data(client);
> +	if (!chip->driver_data) {
> +		ret = -ENODEV;
> +		goto err_exit;
>  	}

Can you move this to be called before devm_regulator_get()? It doesn't require
regulator to be enabled for functioning.

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