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 USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux