Re: [PATCH v1 2/3] auxdisplay: ht16k33: Make use of device_get_match_data()

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

 



On Tue, Feb 21, 2023 at 03:33:06PM +0200, Andy Shevchenko wrote:
> Switching to use device_get_match_data() helps getting of
> i2c_of_match_device() API.

...

> -	id = i2c_of_match_device(dev->driver->of_match_table, client);
> -	if (id)
> -		priv->type = (uintptr_t)id->data;
> +	priv->type = (uintptr_t)device_get_match_data(dev);

Looking closer the I²C ID table should provide DISP_MATRIX to keep default and
this needs to be not dropped.

So, the question is what to do with unknown type then, return -EINVAL from
probe()?

P.S. I would like to collect other comments anyway, so I will send a v2 later.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux