Skip to content

Commit 44bb3f0

Browse files
andy-shevojeda
authored andcommitted
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>
1 parent c726031 commit 44bb3f0

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

drivers/auxdisplay/lcd2s.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
* All rights reserved.
1313
*/
1414
#include <linux/kernel.h>
15+
#include <linux/mod_devicetable.h>
1516
#include <linux/module.h>
17+
#include <linux/property.h>
1618
#include <linux/slab.h>
1719
#include <linux/i2c.h>
1820
#include <linux/delay.h>
@@ -354,20 +356,16 @@ static const struct i2c_device_id lcd2s_i2c_id[] = {
354356
};
355357
MODULE_DEVICE_TABLE(i2c, lcd2s_i2c_id);
356358

357-
#ifdef CONFIG_OF
358359
static const struct of_device_id lcd2s_of_table[] = {
359360
{ .compatible = "modtronix,lcd2s" },
360361
{ }
361362
};
362363
MODULE_DEVICE_TABLE(of, lcd2s_of_table);
363-
#endif
364364

365365
static struct i2c_driver lcd2s_i2c_driver = {
366366
.driver = {
367367
.name = "lcd2s",
368-
#ifdef CONFIG_OF
369-
.of_match_table = of_match_ptr(lcd2s_of_table),
370-
#endif
368+
.of_match_table = lcd2s_of_table,
371369
},
372370
.probe = lcd2s_i2c_probe,
373371
.remove = lcd2s_i2c_remove,

0 commit comments

Comments
 (0)