Commit ae968599 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Jonathan Cameron

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent ab2ecec6
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
#include <linux/module.h> #include <linux/module.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/of.h>
#include <linux/regmap.h> #include <linux/regmap.h>
#include "bmp280.h" #include "bmp280.h"
...@@ -37,7 +36,6 @@ static int bmp280_i2c_probe(struct i2c_client *client, ...@@ -37,7 +36,6 @@ static int bmp280_i2c_probe(struct i2c_client *client,
client->irq); client->irq);
} }
#ifdef CONFIG_OF
static const struct of_device_id bmp280_of_i2c_match[] = { static const struct of_device_id bmp280_of_i2c_match[] = {
{ .compatible = "bosch,bme280", .data = (void *)BME280_CHIP_ID }, { .compatible = "bosch,bme280", .data = (void *)BME280_CHIP_ID },
{ .compatible = "bosch,bmp280", .data = (void *)BMP280_CHIP_ID }, { .compatible = "bosch,bmp280", .data = (void *)BMP280_CHIP_ID },
...@@ -46,9 +44,6 @@ static const struct of_device_id bmp280_of_i2c_match[] = { ...@@ -46,9 +44,6 @@ static const struct of_device_id bmp280_of_i2c_match[] = {
{ }, { },
}; };
MODULE_DEVICE_TABLE(of, 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[] = { static const struct i2c_device_id bmp280_i2c_id[] = {
{"bmp280", BMP280_CHIP_ID }, {"bmp280", BMP280_CHIP_ID },
...@@ -62,7 +57,7 @@ MODULE_DEVICE_TABLE(i2c, bmp280_i2c_id); ...@@ -62,7 +57,7 @@ MODULE_DEVICE_TABLE(i2c, bmp280_i2c_id);
static struct i2c_driver bmp280_i2c_driver = { static struct i2c_driver bmp280_i2c_driver = {
.driver = { .driver = {
.name = "bmp280", .name = "bmp280",
.of_match_table = of_match_ptr(bmp280_of_i2c_match), .of_match_table = bmp280_of_i2c_match,
.pm = &bmp280_dev_pm_ops, .pm = &bmp280_dev_pm_ops,
}, },
.probe = bmp280_i2c_probe, .probe = bmp280_i2c_probe,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment