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

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

 



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





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux