Re: [PATCH] regulator: ltc3589: Convert enum->pointer for data in the match tables

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

 



On Sat, Aug 26, 2023 at 07:19:09PM +0100, Biju Das wrote:
> Convert enum->pointer for data in the match tables, so that the hw
> differences can be stored in pointer and there by simpily the code.
> 
> Add struct ltc3589_info for hw differences between the devices and replace
> ltc3589_variant->ltc3589_info for data in the match table. Simplify the
> probe() by replacing of_device_get_match_data() and ID lookup for
> retrieving data by i2c_get_match_data(). Drop enum ltc3589_variant and
> variant from struct ltc3589_info as there are no users.

...

> +struct ltc3589_info {
> +	int fixed_uV;
> +	const unsigned int *volt_table;
> +};

Can it consume less bytes on some architectures if you swap the order?

...

>  	{ }
>  };
>  MODULE_DEVICE_TABLE(i2c, ltc3589_i2c_id);

>  	{ },

Yeah, a side note about trailing comma in the terminator entries...

>  };
>  MODULE_DEVICE_TABLE(of, ltc3589_of_match);

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