lkml.org 
[lkml]   [2015]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/5] i8042: Add OF match table
Date
The OF device table allows the platform_driver_probe() function to
automatically match device and parse the DT node.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Roman Volkov <v1ron@v1ros.org>
---
drivers/input/serio/i8042.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 924e4bf..c53323e 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1460,12 +1460,22 @@ static int i8042_remove(struct platform_device *dev)
return 0;
}

+#ifdef SERIO_I8042_DT
+static struct of_device_id i8042_dt_ids[] = {
+ { .compatible = "intel,8042" },
+ { /* Sentinel */ },
+};
+#endif
+
static struct platform_driver i8042_driver = {
.driver = {
.name = "i8042",
#ifdef CONFIG_PM
.pm = &i8042_pm_ops,
#endif
+#ifdef SERIO_I8042_DT
+ .of_match_table = i8042_dt_ids,
+#endif
},
.remove = i8042_remove,
.shutdown = i8042_shutdown,
--
2.2.2


\
 
 \ /
  Last update: 2015-02-02 23:01    [W:0.125 / U:1.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site