summaryrefslogtreecommitdiff
path: root/drivers/auxdisplay
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-03-08 17:11:16 +0200
committerMiguel Ojeda <ojeda@kernel.org>2022-03-18 20:31:14 +0100
commit44bb3f038eb5583ae1fdd74f088e9e6235c3875e (patch)
tree969b8405227d1e3abcc566c43de4a5e849ff7681 /drivers/auxdisplay
parentc726031a9d15c243e69c3755d94f7b0b170dd003 (diff)
downloadlwn-44bb3f038eb5583ae1fdd74f088e9e6235c3875e.tar.gz
lwn-44bb3f038eb5583ae1fdd74f088e9e6235c3875e.zip
auxdisplay: lcd2s: make use of device property API
Make use of device property API in this driver so that both OF based system and ACPI based system can use this driver. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'drivers/auxdisplay')
-rw-r--r--drivers/auxdisplay/lcd2s.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/auxdisplay/lcd2s.c b/drivers/auxdisplay/lcd2s.c
index e28ec8452d46..70dd81f7e426 100644
--- a/drivers/auxdisplay/lcd2s.c
+++ b/drivers/auxdisplay/lcd2s.c
@@ -12,7 +12,9 @@
* All rights reserved.
*/
#include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
+#include <linux/property.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/delay.h>
@@ -354,20 +356,16 @@ static const struct i2c_device_id lcd2s_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, lcd2s_i2c_id);
-#ifdef CONFIG_OF
static const struct of_device_id lcd2s_of_table[] = {
{ .compatible = "modtronix,lcd2s" },
{ }
};
MODULE_DEVICE_TABLE(of, lcd2s_of_table);
-#endif
static struct i2c_driver lcd2s_i2c_driver = {
.driver = {
.name = "lcd2s",
-#ifdef CONFIG_OF
- .of_match_table = of_match_ptr(lcd2s_of_table),
-#endif
+ .of_match_table = lcd2s_of_table,
},
.probe = lcd2s_i2c_probe,
.remove = lcd2s_i2c_remove,