Message ID | 20231231183514.566609-3-jic23@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | IIO: Clean up ACPI_PTR() usage. | expand |
Hi, On 12/31/23 19:34, Jonathan Cameron wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > This avoids a build warning due to the use of ACPI_PTR(). > Given the driver already has APCI specific code under CONFIG_ACPI move > the table rather than removing the ACPI_PTR() call as we already > have the complexity of CONFIG_ACPI. > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Cc: Hans de Goede <hdegoede@redhat.com> Thanks, patch looks good to me: Reviewed-by: Hans de Goede <hdegoede@redhat.com> Regards, Hans > --- > drivers/iio/accel/kxcjk-1013.c | 33 +++++++++++++++++---------------- > 1 file changed, 17 insertions(+), 16 deletions(-) > > diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c > index 894709286b0c..7f084f73da84 100644 > --- a/drivers/iio/accel/kxcjk-1013.c > +++ b/drivers/iio/accel/kxcjk-1013.c > @@ -422,6 +422,23 @@ static int kiox010a_dsm(struct device *dev, int fn_index) > ACPI_FREE(obj); > return 0; > } > + > +static const struct acpi_device_id kx_acpi_match[] = { > + {"KXCJ1013", KXCJK1013}, > + {"KXCJ1008", KXCJ91008}, > + {"KXCJ9000", KXCJ91008}, > + {"KIOX0008", KXCJ91008}, > + {"KIOX0009", KXTJ21009}, > + {"KIOX000A", KXCJ91008}, > + {"KIOX010A", KXCJ91008}, /* KXCJ91008 in the display of a yoga 2-in-1 */ > + {"KIOX020A", KXCJ91008}, /* KXCJ91008 in the base of a yoga 2-in-1 */ > + {"KXTJ1009", KXTJ21009}, > + {"KXJ2109", KXTJ21009}, > + {"SMO8500", KXCJ91008}, > + { }, > +}; > +MODULE_DEVICE_TABLE(acpi, kx_acpi_match); > + > #endif > > static int kxcjk1013_set_mode(struct kxcjk1013_data *data, > @@ -1687,22 +1704,6 @@ static const struct dev_pm_ops kxcjk1013_pm_ops = { > kxcjk1013_runtime_resume, NULL) > }; > > -static const struct acpi_device_id kx_acpi_match[] = { > - {"KXCJ1013", KXCJK1013}, > - {"KXCJ1008", KXCJ91008}, > - {"KXCJ9000", KXCJ91008}, > - {"KIOX0008", KXCJ91008}, > - {"KIOX0009", KXTJ21009}, > - {"KIOX000A", KXCJ91008}, > - {"KIOX010A", KXCJ91008}, /* KXCJ91008 in the display of a yoga 2-in-1 */ > - {"KIOX020A", KXCJ91008}, /* KXCJ91008 in the base of a yoga 2-in-1 */ > - {"KXTJ1009", KXTJ21009}, > - {"KXJ2109", KXTJ21009}, > - {"SMO8500", KXCJ91008}, > - { }, > -}; > -MODULE_DEVICE_TABLE(acpi, kx_acpi_match); > - > static const struct i2c_device_id kxcjk1013_id[] = { > {"kxcjk1013", KXCJK1013}, > {"kxcj91008", KXCJ91008},
On Sun, Dec 31, 2023 at 8:35 PM Jonathan Cameron <jic23@kernel.org> wrote: > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > This avoids a build warning due to the use of ACPI_PTR(). > Given the driver already has APCI specific code under CONFIG_ACPI move > the table rather than removing the ACPI_PTR() call as we already > have the complexity of CONFIG_ACPI. ... > +static const struct acpi_device_id kx_acpi_match[] = { > + {"KXCJ1013", KXCJK1013}, > + {"KXCJ1008", KXCJ91008}, > + {"KXCJ9000", KXCJ91008}, > + {"KIOX0008", KXCJ91008}, > + {"KIOX0009", KXTJ21009}, > + {"KIOX000A", KXCJ91008}, > + {"KIOX010A", KXCJ91008}, /* KXCJ91008 in the display of a yoga 2-in-1 */ > + {"KIOX020A", KXCJ91008}, /* KXCJ91008 in the base of a yoga 2-in-1 */ > + {"KXTJ1009", KXTJ21009}, > + {"KXJ2109", KXTJ21009}, > + {"SMO8500", KXCJ91008}, > + { }, Can you drop the comma, while at it? > +};
diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index 894709286b0c..7f084f73da84 100644 --- a/drivers/iio/accel/kxcjk-1013.c +++ b/drivers/iio/accel/kxcjk-1013.c @@ -422,6 +422,23 @@ static int kiox010a_dsm(struct device *dev, int fn_index) ACPI_FREE(obj); return 0; } + +static const struct acpi_device_id kx_acpi_match[] = { + {"KXCJ1013", KXCJK1013}, + {"KXCJ1008", KXCJ91008}, + {"KXCJ9000", KXCJ91008}, + {"KIOX0008", KXCJ91008}, + {"KIOX0009", KXTJ21009}, + {"KIOX000A", KXCJ91008}, + {"KIOX010A", KXCJ91008}, /* KXCJ91008 in the display of a yoga 2-in-1 */ + {"KIOX020A", KXCJ91008}, /* KXCJ91008 in the base of a yoga 2-in-1 */ + {"KXTJ1009", KXTJ21009}, + {"KXJ2109", KXTJ21009}, + {"SMO8500", KXCJ91008}, + { }, +}; +MODULE_DEVICE_TABLE(acpi, kx_acpi_match); + #endif static int kxcjk1013_set_mode(struct kxcjk1013_data *data, @@ -1687,22 +1704,6 @@ static const struct dev_pm_ops kxcjk1013_pm_ops = { kxcjk1013_runtime_resume, NULL) }; -static const struct acpi_device_id kx_acpi_match[] = { - {"KXCJ1013", KXCJK1013}, - {"KXCJ1008", KXCJ91008}, - {"KXCJ9000", KXCJ91008}, - {"KIOX0008", KXCJ91008}, - {"KIOX0009", KXTJ21009}, - {"KIOX000A", KXCJ91008}, - {"KIOX010A", KXCJ91008}, /* KXCJ91008 in the display of a yoga 2-in-1 */ - {"KIOX020A", KXCJ91008}, /* KXCJ91008 in the base of a yoga 2-in-1 */ - {"KXTJ1009", KXTJ21009}, - {"KXJ2109", KXTJ21009}, - {"SMO8500", KXCJ91008}, - { }, -}; -MODULE_DEVICE_TABLE(acpi, kx_acpi_match); - static const struct i2c_device_id kxcjk1013_id[] = { {"kxcjk1013", KXCJK1013}, {"kxcj91008", KXCJ91008},