Commit fe506cc5 authored by Jonathan Cameron's avatar Jonathan Cameron

iio:dac:ad5593r: Drop of_match_ptr and ACPI_PTR protections.

These result in a very small reduction in driver size, but at the
cost of more complex build and slightly harder to read code.
In the case of of_match_ptr it also prevents use of PRP0001
ACPI based identification.  In this particular case we have
a valid ACPI/PNP ID that I am assuming was issued by Analog
Devices.  That should be used in preference to PRP0001 but doesn't
mean we should prevent that route.
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20200910173242.621168-12-jic23@kernel.org
parent 23636b47
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/of.h> #include <linux/mod_devicetable.h>
#include <linux/acpi.h>
#define AD5593R_MODE_CONF (0 << 4) #define AD5593R_MODE_CONF (0 << 4)
#define AD5593R_MODE_DAC_WRITE (1 << 4) #define AD5593R_MODE_DAC_WRITE (1 << 4)
...@@ -124,8 +123,8 @@ MODULE_DEVICE_TABLE(acpi, ad5593r_acpi_match); ...@@ -124,8 +123,8 @@ MODULE_DEVICE_TABLE(acpi, ad5593r_acpi_match);
static struct i2c_driver ad5593r_driver = { static struct i2c_driver ad5593r_driver = {
.driver = { .driver = {
.name = "ad5593r", .name = "ad5593r",
.of_match_table = of_match_ptr(ad5593r_of_match), .of_match_table = ad5593r_of_match,
.acpi_match_table = ACPI_PTR(ad5593r_acpi_match), .acpi_match_table = ad5593r_acpi_match,
}, },
.probe = ad5593r_i2c_probe, .probe = ad5593r_i2c_probe,
.remove = ad5593r_i2c_remove, .remove = ad5593r_i2c_remove,
......
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