From patchwork Sun Feb 6 13:17:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: thomas.abraham@linaro.org X-Patchwork-Id: 78 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:39:46 -0000 Delivered-To: patches@linaro.org Received: by 10.147.124.5 with SMTP id b5cs7740yan; Sun, 6 Feb 2011 05:19:09 -0800 (PST) Received: by 10.142.187.2 with SMTP id k2mr14104878wff.97.1296998348900; Sun, 06 Feb 2011 05:19:08 -0800 (PST) Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by mx.google.com with ESMTP id y5si6451806wfd.68.2011.02.06.05.19.08; Sun, 06 Feb 2011 05:19:08 -0800 (PST) Received-SPF: neutral (google.com: 203.254.224.24 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) client-ip=203.254.224.24; Authentication-Results: mx.google.com; spf=neutral (google.com: 203.254.224.24 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) smtp.mail=thomas.abraham@linaro.org Received: from epmmp2 (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LG7004KC6BVS970@mailout1.samsung.com> for patches@linaro.org; Sun, 06 Feb 2011 22:19:07 +0900 (KST) Received: from localhost.localdomain ([107.108.73.37]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LG700IIC6BL0I@mmp2.samsung.com> for patches@linaro.org; Sun, 06 Feb 2011 22:19:08 +0900 (KST) Date: Sun, 06 Feb 2011 18:47:30 +0530 From: Thomas Abraham Subject: [PATCH 4/4] watchdog: s3c2410: Add support for device tree based probe In-reply-to: <1296998250-21856-1-git-send-email-thomas.abraham@linaro.org> To: devicetree-discuss@lists.ozlabs.org Cc: linaro-dev@lists.linaro.org, patches@linaro.org, kgene.kim@samsung.com Message-id: <1296998250-21856-5-git-send-email-thomas.abraham@linaro.org> X-Mailer: git-send-email 1.6.6.rc2 Content-transfer-encoding: 7BIT References: <1296998250-21856-1-git-send-email-thomas.abraham@linaro.org> This patch adds the of_match_table to enable s3c2410-wdt driver to be probed when watchdog device node is found in the device tree. Signed-off-by: Thomas Abraham --- drivers/watchdog/s3c2410_wdt.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index ae53662..a9edd50 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -592,6 +592,13 @@ static int s3c2410wdt_resume(struct platform_device *dev) #define s3c2410wdt_resume NULL #endif /* CONFIG_PM */ +#ifdef CONFIG_OF +static const struct of_device_id s3c2410_wdt_match[] = { + { .compatible = "samsung,s3c2410-wdt" }, + {}, +}; +MODULE_DEVICE_TABLE(of, s3c2410_wdt_match); +#endif static struct platform_driver s3c2410wdt_driver = { .probe = s3c2410wdt_probe, @@ -602,6 +609,9 @@ static struct platform_driver s3c2410wdt_driver = { .driver = { .owner = THIS_MODULE, .name = "s3c2410-wdt", +#ifdef CONFIG_OF + .of_match_table = s3c2410_wdt_match, +#endif }, };