Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933549AbbBBVvS (ORCPT ); Mon, 2 Feb 2015 16:51:18 -0500 Received: from v1ros.org ([109.234.34.72]:38017 "EHLO smtp.v1ros.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933077AbbBBVvO (ORCPT ); Mon, 2 Feb 2015 16:51:14 -0500 From: Roman Volkov To: Dmitry Torokhov , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Grant Likely Cc: Hans de Goede , Jiri Kosina , Wolfram Sang , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Roman Volkov , Roman Volkov , Tony Prisk Subject: [PATCH 3/5] i8042: Add OF match table Date: Tue, 3 Feb 2015 00:48:48 +0300 Message-Id: <1422913730-12663-3-git-send-email-v1ron@v1ros.org> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1422913730-12663-1-git-send-email-v1ron@v1ros.org> References: <1422913730-12663-1-git-send-email-v1ron@v1ros.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1218 Lines: 44 The OF device table allows the platform_driver_probe() function to automatically match device and parse the DT node. Signed-off-by: Tony Prisk Signed-off-by: Roman Volkov --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/