From patchwork Mon Jun 20 11:02: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: 2081 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 19AC523F51 for ; Mon, 20 Jun 2011 10:53:33 +0000 (UTC) Received: from mail-vw0-f52.google.com (mail-vw0-f52.google.com [209.85.212.52]) by fiordland.canonical.com (Postfix) with ESMTP id DDF1BA18477 for ; Mon, 20 Jun 2011 10:53:32 +0000 (UTC) Received: by mail-vw0-f52.google.com with SMTP id 16so3360447vws.11 for ; Mon, 20 Jun 2011 03:53:32 -0700 (PDT) Received: by 10.52.175.197 with SMTP id cc5mr3253052vdc.287.1308567212689; Mon, 20 Jun 2011 03:53:32 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.52.183.130 with SMTP id em2cs24149vdc; Mon, 20 Jun 2011 03:53:32 -0700 (PDT) Received: by 10.150.174.18 with SMTP id w18mr5245682ybe.374.1308567212138; Mon, 20 Jun 2011 03:53:32 -0700 (PDT) Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by mx.google.com with ESMTP id w37si7293310ybk.5.2011.06.20.03.53.31; Mon, 20 Jun 2011 03:53:32 -0700 (PDT) Received-SPF: neutral (google.com: 203.254.224.34 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) client-ip=203.254.224.34; Authentication-Results: mx.google.com; spf=neutral (google.com: 203.254.224.34 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) smtp.mail=thomas.abraham@linaro.org Received: from epcpsbgm1.samsung.com (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LN3002UK4WH3MC0@mailout4.samsung.com> for patches@linaro.org; Mon, 20 Jun 2011 19:53:12 +0900 (KST) X-AuditID: cbfee61a-b7ce2ae000001a8f-f9-4dff2698a6ac Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (MMPCPMTA) with SMTP id 9F.9E.06799.8962FFD4; Mon, 20 Jun 2011 19:53:12 +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 <0LN300JSM4W4PB@mmp2.samsung.com> for patches@linaro.org; Mon, 20 Jun 2011 19:53:12 +0900 (KST) Date: Mon, 20 Jun 2011 16:32:30 +0530 From: Thomas Abraham Subject: [PATCH 4/6] mmc: sdhci-s3c: Add support for device tree based probe In-reply-to: <1308567752-13451-1-git-send-email-thomas.abraham@linaro.org> To: devicetree-discuss@lists.ozlabs.org Cc: linaro-dev@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com, ben-linux@fluff.org, patches@linaro.org Message-id: <1308567752-13451-5-git-send-email-thomas.abraham@linaro.org> X-Mailer: git-send-email 1.6.6.rc2 Content-transfer-encoding: 7BIT References: <1308567752-13451-1-git-send-email-thomas.abraham@linaro.org> X-Brightmail-Tracker: AAAAAA== Add of_match_table to enable sdhci-s3c driver to be probed when a compatible sdhci device node is found in device tree. Signed-off-by: Thomas Abraham --- This is temporary patch. sdhci-s3c driver has to be moved to sdhci-pltfm based driver. drivers/mmc/host/sdhci-s3c.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 69e3ee3..5ccbee0 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -629,6 +629,16 @@ static int sdhci_s3c_resume(struct platform_device *dev) #define sdhci_s3c_resume NULL #endif +#ifdef CONFIG_OF +static const struct of_device_id s3c_sdhci_match[] = { + { .compatible = "samsung,s3c-sdhci" }, + {}, +}; +MODULE_DEVICE_TABLE(of, s3c_sdhci_match); +#else +#define s3c_sdhci_match NULL +#endif + static struct platform_driver sdhci_s3c_driver = { .probe = sdhci_s3c_probe, .remove = __devexit_p(sdhci_s3c_remove), @@ -637,6 +647,7 @@ static struct platform_driver sdhci_s3c_driver = { .driver = { .owner = THIS_MODULE, .name = "s3c-sdhci", + .of_match_table = s3c_sdhci_match, }, };