[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1423857173-16432-4-git-send-email-v1ron@v1ros.org>
Date: Fri, 13 Feb 2015 22:52:51 +0300
From: Roman Volkov <v1ron@...os.org>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Grant Likely <grant.likely@...aro.org>
Cc: Hans de Goede <hdegoede@...hat.com>, Jiri Kosina <jkosina@...e.cz>,
Wolfram Sang <wsa@...-dreams.de>, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
Roman Volkov <v1ron@...os.org>,
Tony Prisk <linux@...sktech.co.nz>
Subject: [PATCH v2 3/5] i8042: Add OF match table
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@...sktech.co.nz>
Signed-off-by: Roman Volkov <v1ron@...os.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 986a71c..2f09062 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1474,12 +1474,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.3.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists