From patchwork Thu Mar 14 10:01:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2268961 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 F0C01DFB79 for ; Thu, 14 Mar 2013 10:35:00 +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 1UG5Ux-0000mG-Th; Thu, 14 Mar 2013 10:34:59 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UG5Uw-0000m6-EX for spi-devel-general@lists.sourceforge.net; Thu, 14 Mar 2013 10:34:58 +0000 Received: from mail-pb0-f54.google.com ([209.85.160.54]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1UG5Ut-00032J-0T for spi-devel-general@lists.sourceforge.net; Thu, 14 Mar 2013 10:34:58 +0000 Received: by mail-pb0-f54.google.com with SMTP id rr4so2010843pbb.13 for ; Thu, 14 Mar 2013 03:34:48 -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=fZJAREiyuvIoPLGJqK2wJT+F2UfReqsi5CqtBsnGy2g=; b=Hc3qYtGSoSj69qNvhAEqkGkHXH4Np1X3zCFy4PBY3cc5Lm6hJRrxZgGtCHNLN7X9Lz H8XdmshINIBHtTpynTcGK48JCR0WujMfRy+hytwPyfqjRb7tJSZAQp6/l7tye8sGWufG SGIRFM8b1XLZxdorqu/lGl084KBq9/bIA3LF/KC9xMKApqoya+jWzSNCqX+RWmbrKyP8 +UEWCHxhrNMEEiJgVn+oozpRXER+kjuZNrqY3WUsKiXHTGfPzm+1Dd+6pFreMOYz9Uqw t8olwqt5Lec35aBomoOzWZnItPE11KlCzNBDfhQrdOs8ZutwvfS4rIZT0dEDqrj90luH yP7g== X-Received: by 10.68.241.225 with SMTP id wl1mr4132789pbc.170.1363255967053; Thu, 14 Mar 2013 03:12:47 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id kl4sm2544979pbc.31.2013.03.14.03.12.44 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 14 Mar 2013 03:12:46 -0700 (PDT) From: Sachin Kamat To: spi-devel-general@lists.sourceforge.net Subject: [PATCH 2/2] spi: spi-sh-msiof: Use of_match_ptr() macro Date: Thu, 14 Mar 2013 15:31:51 +0530 Message-Id: <1363255311-18151-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1363255311-18151-1-git-send-email-sachin.kamat@linaro.org> References: <1363255311-18151-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQmBzBYkm592DrjURmQBnK+/+9nX22krN9TvtMea/yGxx+XtM30Fa2MhfCnVabdue5VdStnY 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: 1UG5Ut-00032J-0T Cc: sachin.kamat@linaro.org, broonie@opensource.wolfsonmicro.com 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 --- drivers/spi/spi-sh-msiof.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index 8b40d08..2bc5a6b 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c @@ -764,8 +764,6 @@ static const struct of_device_id sh_msiof_match[] = { {}, }; MODULE_DEVICE_TABLE(of, sh_msiof_match); -#else -#define sh_msiof_match NULL #endif static struct dev_pm_ops sh_msiof_spi_dev_pm_ops = { @@ -780,7 +778,7 @@ static struct platform_driver sh_msiof_spi_drv = { .name = "spi_sh_msiof", .owner = THIS_MODULE, .pm = &sh_msiof_spi_dev_pm_ops, - .of_match_table = sh_msiof_match, + .of_match_table = of_match_ptr(sh_msiof_match), }, }; module_platform_driver(sh_msiof_spi_drv);