From patchwork Thu Mar 14 10:01:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2269231 Return-Path: X-Original-To: patchwork-spi-devel-general@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by patchwork2.kernel.org (Postfix) with ESMTP id 703B9DFB79 for ; Thu, 14 Mar 2013 10:39:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UG5ZD-0000wG-1f; Thu, 14 Mar 2013 10:39:23 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UG5ZB-0000w9-Vb for spi-devel-general@lists.sourceforge.net; Thu, 14 Mar 2013 10:39:21 +0000 Received: from mail-pb0-f43.google.com ([209.85.160.43]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1UG5ZA-00081v-BW for spi-devel-general@lists.sourceforge.net; Thu, 14 Mar 2013 10:39:21 +0000 Received: by mail-pb0-f43.google.com with SMTP id md12so2013827pbc.2 for ; Thu, 14 Mar 2013 03:39:14 -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 :x-gm-message-state; bh=11mwb2e3afoni89SR97ar1j20FTxCrjSkcIBwynUY9k=; b=deLMU6PVRhKfa+n1b1roCHdZPtSwAaKiOBDEncZKDQ37r2RrbhG6X0VS1A5wrqQYaL 2xsL7J8V3lJonOGYAZ61gpjD1tLDdeXdCiHG9YHp4zewrOoTV+HhnIxkLfbsdOZXA2Ce J57kJb+jqX46MUCy36lnngjE/CmtaWIgVUHCItND/RzoEo2RniDTO76ogZCDODpVezfC UsNYz01XiLh1ZhqZ2PJhCEKwuZJaw0u9Tky4TesxegowVkE6ypilz6OFF36gOW6KxlUT gr2gQ8ztixjA265RRFB/MYy5rrN2ZPpwbCMTpGSTyZ5wOh2dY1REiVkSnAwzVlVc1NMS hj4Q== X-Received: by 10.68.186.132 with SMTP id fk4mr4506930pbc.18.1363255964078; Thu, 14 Mar 2013 03:12:44 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id kl4sm2544979pbc.31.2013.03.14.03.12.41 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 14 Mar 2013 03:12:43 -0700 (PDT) From: Sachin Kamat To: spi-devel-general@lists.sourceforge.net Subject: [PATCH 1/2] spi: spi-oc-tiny: Use of_match_ptr() macro Date: Thu, 14 Mar 2013 15:31:50 +0530 Message-Id: <1363255311-18151-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQkgB/A4XbQfCbBVvL1I1TrjjASt+m4dWfGs9GplYyPigcWOdKKt5ZZwWVwGGUu9obPSxupX X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. X-Headers-End: 1UG5ZA-00081v-BW Cc: sachin.kamat@linaro.org, broonie@opensource.wolfsonmicro.com, Thomas Chou X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat Cc: Thomas Chou Acked-by: Thomas Chou --- drivers/spi/spi-oc-tiny.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c index cb2e284..e60a776 100644 --- a/drivers/spi/spi-oc-tiny.c +++ b/drivers/spi/spi-oc-tiny.c @@ -393,8 +393,6 @@ static const struct of_device_id tiny_spi_match[] = { {}, }; MODULE_DEVICE_TABLE(of, tiny_spi_match); -#else /* CONFIG_OF */ -#define tiny_spi_match NULL #endif /* CONFIG_OF */ static struct platform_driver tiny_spi_driver = { @@ -404,7 +402,7 @@ static struct platform_driver tiny_spi_driver = { .name = DRV_NAME, .owner = THIS_MODULE, .pm = NULL, - .of_match_table = tiny_spi_match, + .of_match_table = of_match_ptr(tiny_spi_match), }, }; module_platform_driver(tiny_spi_driver);