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

From: Andy Shevchenko
Date: Tue Feb 21 2023 - 08:40:20 EST


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