summaryrefslogtreecommitdiffstats
path: root/drivers/iio/pressure/bmp280-i2c.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-12-09 19:28:05 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-12-29 16:20:10 +0100
commitae9685992cd542b7881ff1d64a4bfd7ba509c3bb (patch)
tree2aabb16b847157dc9af9d5f842fb4d9ec9860aac /drivers/iio/pressure/bmp280-i2c.c
parentiio: pressure: bmp280: Drop ACPI support (diff)
downloadlinux-ae9685992cd542b7881ff1d64a4bfd7ba509c3bb.tar.xz
linux-ae9685992cd542b7881ff1d64a4bfd7ba509c3bb.zip
iio: pressure: bmp280: Allow device to be enumerated from ACPI
There is no need to limit the driver use by OF/platform code. In this case we simple remove redundant OF parts from the code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to '')
-rw-r--r--drivers/iio/pressure/bmp280-i2c.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/iio/pressure/bmp280-i2c.c b/drivers/iio/pressure/bmp280-i2c.c
index 06f90853c141..8b03ea15c0d0 100644
--- a/drivers/iio/pressure/bmp280-i2c.c
+++ b/drivers/iio/pressure/bmp280-i2c.c
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/module.h>
#include <linux/i2c.h>
-#include <linux/of.h>
#include <linux/regmap.h>
#include "bmp280.h"
@@ -37,7 +36,6 @@ static int bmp280_i2c_probe(struct i2c_client *client,
client->irq);
}
-#ifdef CONFIG_OF
static const struct of_device_id bmp280_of_i2c_match[] = {
{ .compatible = "bosch,bme280", .data = (void *)BME280_CHIP_ID },
{ .compatible = "bosch,bmp280", .data = (void *)BMP280_CHIP_ID },
@@ -46,9 +44,6 @@ static const struct of_device_id bmp280_of_i2c_match[] = {
{ },
};
MODULE_DEVICE_TABLE(of, bmp280_of_i2c_match);
-#else
-#define bmp280_of_i2c_match NULL
-#endif
static const struct i2c_device_id bmp280_i2c_id[] = {
{"bmp280", BMP280_CHIP_ID },
@@ -62,7 +57,7 @@ MODULE_DEVICE_TABLE(i2c, bmp280_i2c_id);
static struct i2c_driver bmp280_i2c_driver = {
.driver = {
.name = "bmp280",
- .of_match_table = of_match_ptr(bmp280_of_i2c_match),
+ .of_match_table = bmp280_of_i2c_match,
.pm = &bmp280_dev_pm_ops,
},
.probe = bmp280_i2c_probe,