On Sun, 3 Oct 2021 19:28:06 +0300 Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote: > 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 One day I'll actually remember to spell check my patch descriptions. Sorry! > > > 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. Doesn't make me competent at writing my native language :) > > ... > > > +#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. > Sure. I was going for minimal change + most revert like, but fair enough we'll clean that up whilst here. Jonathan