From patchwork Thu Feb 6 03:45:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3592721 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 695629F2F5 for ; Thu, 6 Feb 2014 03:45:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A231720166 for ; Thu, 6 Feb 2014 03:45:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A807120172 for ; Thu, 6 Feb 2014 03:45:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754652AbaBFDpP (ORCPT ); Wed, 5 Feb 2014 22:45:15 -0500 Received: from mail-pb0-f54.google.com ([209.85.160.54]:59797 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754474AbaBFDpO (ORCPT ); Wed, 5 Feb 2014 22:45:14 -0500 Received: by mail-pb0-f54.google.com with SMTP id uo5so1232233pbc.27 for ; Wed, 05 Feb 2014 19:45:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=0pqosvv5fqJWK134adBIrUZLTNvKFNQ7qwwbtL27vg0=; b=Ar1Kkkf960BsTTNkfSVvkqoF0Ukf9IZj6B0Nq4097BCrntyQLLLMYtFU6rn1s5nbq0 szpIgAFRSnOlQHwyRgLuLQ3QzWQIphWNbTDxmaVMtHFPKeTXvQxh0WJIv+85DXIbBQ78 VOi4xlHwets8vc6eq9NHpcag15pt4ivZnUpOnQckpxPeeKVfEOJF3+lJhGULaY9kwWKW MioKou+V5KezFyT2/BND8+Q8228A4+LHpKzfLnBRMNy4AAy7dm9sMK3gqsZ0rjLEwaM9 Apv8ZVT3Wy2U+gzqOMlqYYOd6ch/MZTj0n61NzEf+KZKO+Tbql6zcIMJWVRnUBI73NGI zZpg== X-Gm-Message-State: ALoCoQnKeXfdPyt9aNjUgAQ0xLSEB+7zrtCXPMmzLFIRnNhfwekbA6BadPO/Ndf+gFxQ0In34Hmt X-Received: by 10.68.231.35 with SMTP id td3mr8249365pbc.137.1391658313781; Wed, 05 Feb 2014 19:45:13 -0800 (PST) Received: from [192.168.0.102] (36-239-208-123.dynamic-ip.hinet.net. [36.239.208.123]) by mx.google.com with ESMTPSA id sx8sm210631107pab.5.2014.02.05.19.45.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Feb 2014 19:45:12 -0800 (PST) Message-ID: <1391658308.12574.3.camel@phoenix> Subject: [PATCH] spi: davinci: Use of_match_ptr at appropriate place From: Axel Lin To: Mark Brown Cc: Murali Karicheri , linux-spi@vger.kernel.org Date: Thu, 06 Feb 2014 11:45:08 +0800 X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It's pointless to use of_match_ptr within CONFIG_OF guard. Use of_match_ptr around davinci_spi_of_match when setting .of_match_table. Signed-off-by: Axel Lin --- drivers/spi/spi-davinci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 04d69b6..50f7509 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -802,8 +802,7 @@ static int spi_davinci_get_pdata(struct platform_device *pdev, pdata = &dspi->pdata; pdata->version = SPI_VERSION_1; - match = of_match_device(of_match_ptr(davinci_spi_of_match), - &pdev->dev); + match = of_match_device(davinci_spi_of_match, &pdev->dev); if (!match) return -ENODEV; @@ -824,7 +823,6 @@ static int spi_davinci_get_pdata(struct platform_device *pdev, return 0; } #else -#define davinci_spi_of_match NULL static struct davinci_spi_platform_data *spi_davinci_get_pdata(struct platform_device *pdev, struct davinci_spi *dspi) @@ -1032,7 +1030,7 @@ static struct platform_driver davinci_spi_driver = { .driver = { .name = "spi_davinci", .owner = THIS_MODULE, - .of_match_table = davinci_spi_of_match, + .of_match_table = of_match_ptr(davinci_spi_of_match), }, .probe = davinci_spi_probe, .remove = davinci_spi_remove,