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

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

 



Hi Andy,

Thanks for the feedback.

> Subject: Re: [PATCH] iio: adc: max1363: Use i2c_get_match_data()
> 
> 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.

Currently OF table is using macro. So for consistency, I added
macro for ID table.

I am leaving this to Jonathan as previously he mentioned
he wanted consistency among the tables. 

Cheers,
Biju




[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