diff options
Diffstat (limited to 'drivers/iio/potentiometer/max5481.c')
-rw-r--r-- | drivers/iio/potentiometer/max5481.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/drivers/iio/potentiometer/max5481.c b/drivers/iio/potentiometer/max5481.c index 5f5988189796..a88ed0eb3adc 100644 --- a/drivers/iio/potentiometer/max5481.c +++ b/drivers/iio/potentiometer/max5481.c @@ -7,12 +7,11 @@ * https://datasheets.maximintegrated.com/en/ds/MAX5481-MAX5484.pdf */ -#include <linux/acpi.h> #include <linux/iio/iio.h> #include <linux/iio/sysfs.h> #include <linux/module.h> -#include <linux/of.h> -#include <linux/of_device.h> +#include <linux/mod_devicetable.h> +#include <linux/property.h> #include <linux/spi/spi.h> /* write wiper reg */ @@ -117,7 +116,6 @@ static const struct iio_info max5481_info = { .write_raw = max5481_write_raw, }; -#if defined(CONFIG_OF) static const struct of_device_id max5481_match[] = { { .compatible = "maxim,max5481", .data = &max5481_cfg[max5481] }, { .compatible = "maxim,max5482", .data = &max5481_cfg[max5482] }, @@ -126,7 +124,6 @@ static const struct of_device_id max5481_match[] = { { } }; MODULE_DEVICE_TABLE(of, max5481_match); -#endif static int max5481_probe(struct spi_device *spi) { @@ -144,7 +141,7 @@ static int max5481_probe(struct spi_device *spi) data->spi = spi; - data->cfg = of_device_get_match_data(&spi->dev); + data->cfg = device_get_match_data(&spi->dev); if (!data->cfg) data->cfg = &max5481_cfg[id->driver_data]; @@ -184,22 +181,10 @@ static const struct spi_device_id max5481_id_table[] = { }; MODULE_DEVICE_TABLE(spi, max5481_id_table); -#if defined(CONFIG_ACPI) -static const struct acpi_device_id max5481_acpi_match[] = { - { "max5481", max5481 }, - { "max5482", max5482 }, - { "max5483", max5483 }, - { "max5484", max5484 }, - { } -}; -MODULE_DEVICE_TABLE(acpi, max5481_acpi_match); -#endif - static struct spi_driver max5481_driver = { .driver = { .name = "max5481", - .of_match_table = of_match_ptr(max5481_match), - .acpi_match_table = ACPI_PTR(max5481_acpi_match), + .of_match_table = max5481_match, }, .probe = max5481_probe, .remove = max5481_remove, |