lkml.org 
[lkml]   [2018]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/3] iio: adc128s052: add ACPI _HID AANT1280
Hi Andy,

On Tue, Apr 24, 2018 at 01:08:31AM +0300, Andy Shevchenko wrote:
> > + if (ACPI_COMPANION(&spi->dev)) {
>
> > + const struct acpi_device_id *ad_id;
> > +
> > + ad_id = acpi_match_device(spi->dev.driver->acpi_match_table,
> > + &spi->dev);
> > + if (!ad_id)
> > + return -ENODEV;
> > +
> > + config = ad_id->driver_data;
>
> There is a new API to get it by one call.
> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/commit/?id=b283f157611f129f5bbbf7d06f5af860d76797fd

That looks much cleaner. Will do for a v3.

Thank you!

\
 
 \ /
  Last update: 2018-04-24 12:51    [W:0.053 / U:1.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site