Re: [PATCH] iio: adc: ti-adc081c: Partial revert of removal of ACPI IDs

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

 



On Sun, Oct 3, 2021 at 7:20 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
>
> Unfortuanately a non standards compliant ACPI ID is known to be

Unfortunately

> in the wild on some AAEON boards.
>
> Partly revert the removal of these IDs so that ADC081C will again
> work + add a comment to that affect for future reference.

affect?! Okay, you are native speaker.

...

> +#include <linux/acpi.h>

> +       if (ACPI_COMPANION(&client->dev)) {
> +               const struct acpi_device_id *ad_id;
> +
> +               ad_id = acpi_match_device(client->dev.driver->acpi_match_table,
> +                                         &client->dev);
> +               if (!ad_id)
> +                       return -ENODEV;
> +               model = &adcxx1c_models[ad_id->driver_data];
> +       } else {
> +               model = &adcxx1c_models[id->driver_data];
> +       }

Can we please use device_get_match_data() instead (with corresponding
property.h inclusion instead of acpi.h)?
This may require adding driver_data to OF IDs.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux