Re: [PATCH] iio: adc: max1363: Use i2c_get_match_data()

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

 



On Fri, Aug 18, 2023 at 02:48:45PM +0000, Biju Das wrote:
> > On Sat, Aug 12, 2023 at 08:24:19AM +0100, Biju Das wrote:

...

> > > +#define MAX1363_ID_TABLE(_name, cfg) {				\
> > > +	.name = _name,						\
> > > +	.driver_data = (kernel_ulong_t)&max1363_chip_info_tbl[cfg],	\
> > > +}
> > 
> > Just use them directly, like in 4 lines each instead of a single one.
> > 
> > 	{
> > 		.name = max1361,
> > 		.driver_data = (kernel_ulong_t)&max1363_chip_info_tbl[max1361]
> > 	},
> > 
> > or this, but it's almost 100 characters.
> 
> OK, will create a separate patch for this change.
> 
> Worst case, we can drop named fields?? (.name and .driver_data)

I wouldn't do that as the goal in kernel is to use C99 initialized more
and not less.

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