Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

From: Andy Shevchenko
Date: Wed Aug 26 2020 - 05:56:25 EST


On Wed, Aug 26, 2020 at 12:53:56PM +0300, Andy Shevchenko wrote:
> On Wed, Aug 26, 2020 at 02:25:44PM +0900, Sergey Senozhatsky wrote:
> > On (20/08/26 07:08), Wolfram Sang wrote:

...

> You probably meant simply:
>
> if (!i2c_device_match(dev, dev->driver)) {
>
> > status = -ENODEV;
> > goto put_sync_adapter;
> > }
>
> On the first glance it will work the same way but slightly longer in case of ID
> table matching.
>
> Send a patch!

But then the question is why we have this code in the ->probe() at all?
->match() is run before probe by bus core, no?

Wolfram?

--
With Best Regards,
Andy Shevchenko