Re: [PATCH] hwmon: Initialize i2c_device_id structures by name

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

 



On Sat, Dec 07, 2024 at 08:44:45PM +0200, Andy Shevchenko wrote:
> On Sat, Dec 07, 2024 at 07:32:43AM -0800, Guenter Roeck wrote:
> > On 12/7/24 01:13, Uwe Kleine-König wrote:

...

> > Something like that, though I'd even hide the parameter type and just have
> > 
> > 	#define I2C_DEVICE_ID_DATA(_name, _data)	\
> > 		{ .name = (_name), .driver_data = (kernel_ulong_t)_data }
> > 
> > 	#define I2C_DEVICE_ID(_name)	\
> > 		{ .name = (_name) }
> 
> It's better, if we go this way, to keep this in sync with above by changing as
> 
> 	#define I2C_DEVICE_ID(_name)	I2C_DEVICE_ID_DATA(_name, 0)

Or even NULL as the intention to use pointers at the end AFAIU.

> > where I2C_DEVICE_ID_DATA() would accept any type.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux