summaryrefslogtreecommitdiff
path: root/drivers/iio/accel
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-08-31 12:08:10 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-09-03 19:40:59 +0100
commit846afc1dbcbf878b3c8e685910ad6ce90d79de4b (patch)
treee308363380adf4d31535e870205027b6f242f43f /drivers/iio/accel
parent4d9a167a3436b960b25900fb9539d953657cf501 (diff)
iio: accel: bma220: Drop ACPI_PTR() and accompanying ifdeffery
The driver is quite likely used only on ACPI based platforms and rarely build with CONFIG_ACPI=n. Even though, the few dozens of bytes is better than ugly ifdeffery and inclusion of heavy header. As a result, replace acpi.h with mod_devicetable.h. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200831090813.78841-5-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r--drivers/iio/accel/bma220_spi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/iio/accel/bma220_spi.c b/drivers/iio/accel/bma220_spi.c
index 094fd010270d..044902ac8e29 100644
--- a/drivers/iio/accel/bma220_spi.c
+++ b/drivers/iio/accel/bma220_spi.c
@@ -5,8 +5,8 @@
* Copyright (c) 2016, Intel Corporation.
*/
-#include <linux/acpi.h>
#include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/iio/buffer.h>
#include <linux/iio/iio.h>
@@ -308,20 +308,18 @@ static const struct spi_device_id bma220_spi_id[] = {
{}
};
-#ifdef CONFIG_ACPI
static const struct acpi_device_id bma220_acpi_id[] = {
{"BMA0220", 0},
{}
};
MODULE_DEVICE_TABLE(spi, bma220_spi_id);
-#endif
static struct spi_driver bma220_driver = {
.driver = {
.name = "bma220_spi",
.pm = &bma220_pm_ops,
- .acpi_match_table = ACPI_PTR(bma220_acpi_id),
+ .acpi_match_table = bma220_acpi_id,
},
.probe = bma220_probe,
.remove = bma220_remove,