From patchwork Thu Mar 14 10:07:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 227531 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5428F2C00A8 for ; Thu, 14 Mar 2013 21:20:01 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UG5Ef-0003JB-AJ; Thu, 14 Mar 2013 10:18:09 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UG5EW-0003Gh-J9 for linux-mtd@lists.infradead.org; Thu, 14 Mar 2013 10:18:05 +0000 Received: by mail-pb0-f46.google.com with SMTP id uo15so1981664pbc.5 for ; Thu, 14 Mar 2013 03:17:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=gLNR3p1zSgp/os1/5L1UOHpoEjypgisZ13u7ulfJZ24=; b=b7lxkuSSvbn+vf+CPJqVwOBzSAmDfJ7/yNKDRcwlUGJIgvAVbZ4sUuI+9E4zYqUtgd jN5kSmG8nMlY4fdndbQEozREzzS/44d5w/a4r43snZdzdy08S29iDJgpm/PhCzTKfPGz iKpdNIvEhQc+tL35NuTAUxEmsv6rKgD89t5jzzKBOiNAZcINahd/FHmHWeG8XyTFyycQ ta0SO+lpMUONilOnnmZOo0zKJbWvvy38dP/uwwYoa/8wXeX++3ye/zlX6ESPXmyX5KsZ 2xk+6yh8pH0Xp6GXOCGspkASd4c7LWaGT6klG32NMSLgg5IGN3aFRWD92qC2BrKDYE7R grTA== X-Received: by 10.68.196.35 with SMTP id ij3mr4364978pbc.56.1363256278647; Thu, 14 Mar 2013 03:17:58 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id iv3sm2557812pbc.40.2013.03.14.03.17.55 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 14 Mar 2013 03:17:58 -0700 (PDT) From: Sachin Kamat To: linux-mtd@lists.infradead.org Subject: [PATCH 2/5] mtd: davinci_nand: Use of_match_ptr() Date: Thu, 14 Mar 2013 15:37:01 +0530 Message-Id: <1363255624-20885-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1363255624-20885-1-git-send-email-sachin.kamat@linaro.org> References: <1363255624-20885-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQl8wbiZx/kHuQorKKGaikA0srA+JguiUuThpK+hCh5sGqXksTPiB22xM2Qz9lOS3nyMK/iR X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130314_061800_711784_1D200B7A X-CRM114-Status: GOOD ( 12.82 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.46 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: sachin.kamat@linaro.org, artem.bityutskiy@linux.intel.com, dwmw2@infradead.org, dedekind1@gmail.com X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat --- drivers/mtd/nand/davinci_nand.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index 864717b..c3e15a5 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -577,7 +578,6 @@ static struct davinci_nand_pdata return pdev->dev.platform_data; } #else -#define davinci_nand_of_match NULL static struct davinci_nand_pdata *nand_davinci_get_pdata(struct platform_device *pdev) { @@ -878,7 +878,7 @@ static struct platform_driver nand_davinci_driver = { .driver = { .name = "davinci_nand", .owner = THIS_MODULE, - .of_match_table = davinci_nand_of_match, + .of_match_table = of_match_ptr(davinci_nand_of_match), }, }; MODULE_ALIAS("platform:davinci_nand");