iio: accel: bmc150: Drop ACPI_PTR()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 31 Dec 2023 18:34:58 +0000 (18:34 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 23 Jan 2024 22:06:54 +0000 (22:06 +0000)
In general the complexity of avoiding maybe unused variable warnings is
not worth dealing with for the small amount of data saved. In thie
case, the i2c driver does include some other code under a CONFIG_ACPI
guard but remove the ACPI_PTR() usage anyway to bring keep it inline
with the spi driver.

Drop include of linux/acpi.h in the spi driver that doesn't need
it as struct acpi_device_id is defined in mod_devicetable.h which
is already included.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20231231183514.566609-9-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/bmc150-accel-i2c.c
drivers/iio/accel/bmc150-accel-spi.c

index ee1ba134ad4237269ea39411563580ca2d1163c5..f08594b372cfc6c1f56ac7bcfe71a51da2b4094d 100644 (file)
@@ -266,7 +266,7 @@ static struct i2c_driver bmc150_accel_driver = {
        .driver = {
                .name   = "bmc150_accel_i2c",
                .of_match_table = bmc150_accel_of_match,
-               .acpi_match_table = ACPI_PTR(bmc150_accel_acpi_match),
+               .acpi_match_table = bmc150_accel_acpi_match,
                .pm     = &bmc150_accel_pm_ops,
        },
        .probe          = bmc150_accel_probe,
index 921fb46be0b8f06bcdbf18f784fbe83033e81cf0..a6b9f599eb7bdcf8aaa7fb2e8933884c0329c716 100644 (file)
@@ -7,7 +7,6 @@
 #include <linux/device.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/acpi.h>
 #include <linux/regmap.h>
 #include <linux/spi/spi.h>
 
@@ -70,7 +69,7 @@ MODULE_DEVICE_TABLE(spi, bmc150_accel_id);
 static struct spi_driver bmc150_accel_driver = {
        .driver = {
                .name   = "bmc150_accel_spi",
-               .acpi_match_table = ACPI_PTR(bmc150_accel_acpi_match),
+               .acpi_match_table = bmc150_accel_acpi_match,
                .pm     = &bmc150_accel_pm_ops,
        },
        .probe          = bmc150_accel_probe,