All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/4] auxdisplay: lcd2s: make use of device property API
@ 2022-03-08 15:11 Andy Shevchenko
  2022-03-08 15:11 ` [PATCH v1 2/4] auxdisplay: lcd2s: use module_i2c_driver to simplify the code Andy Shevchenko
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Andy Shevchenko @ 2022-03-08 15:11 UTC (permalink / raw)
  To: Andy Shevchenko, Miguel Ojeda, linux-kernel

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>
---
 drivers/auxdisplay/lcd2s.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/auxdisplay/lcd2s.c b/drivers/auxdisplay/lcd2s.c
index 2578b2d45439..c75e9d66aaa1 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>
@@ -355,20 +357,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,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-03-24  9:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 15:11 [PATCH v1 1/4] auxdisplay: lcd2s: make use of device property API Andy Shevchenko
2022-03-08 15:11 ` [PATCH v1 2/4] auxdisplay: lcd2s: use module_i2c_driver to simplify the code Andy Shevchenko
2022-03-08 15:11 ` [PATCH v1 3/4] auxdisplay: lcd2s: Switch to i2c ->probe_new() Andy Shevchenko
2022-03-08 15:11 ` [PATCH v1 4/4] auxdisplay: lcd2s: Use array size explicitly in lcd2s_gotoxy() Andy Shevchenko
2022-03-19  0:29   ` Miguel Ojeda
2022-03-19 11:37     ` Andy Shevchenko
2022-03-23 19:15       ` Miguel Ojeda
2022-03-24  9:21         ` Andy Shevchenko
2022-03-23 19:02 ` [PATCH v1 1/4] auxdisplay: lcd2s: make use of device property API Miguel Ojeda
2022-03-24  9:21   ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.