From patchwork Thu Nov 15 10:32:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10684091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 325CB109C for ; Thu, 15 Nov 2018 10:32:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21F4D2BF93 for ; Thu, 15 Nov 2018 10:32:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15A9F2BFA3; Thu, 15 Nov 2018 10:32:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE2582BF93 for ; Thu, 15 Nov 2018 10:32:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728609AbeKOUje (ORCPT ); Thu, 15 Nov 2018 15:39:34 -0500 Received: from shell.v3.sk ([90.176.6.54]:50221 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728757AbeKOUje (ORCPT ); Thu, 15 Nov 2018 15:39:34 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id B87364A9B1; Thu, 15 Nov 2018 11:32:16 +0100 (CET) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id mSKQ4qYRkC6v; Thu, 15 Nov 2018 11:32:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 8DBCE4A9B8; Thu, 15 Nov 2018 11:32:13 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id OtJ_Q3lG1ANs; Thu, 15 Nov 2018 11:32:13 +0100 (CET) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 8E7974A9B1; Thu, 15 Nov 2018 11:32:12 +0100 (CET) From: Lubomir Rintel To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: Mark Brown , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Lubomir Rintel Subject: [PATCH v2] spi: pxa2xx: Fix '"CONFIG_OF" is not defined' warning Date: Thu, 15 Nov 2018 11:32:09 +0100 Message-Id: <20181115103209.20619-1-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A careless oversight. Sorry. Fixes: 0a897143b7c9 ("spi: pxa2xx: Add slave mode support") Signed-off-by: Lubomir Rintel --- Changes since v1: - Applied Robert Jarzmik's wise suggestion to remove useless conditionals and thus reduce this into a single line. drivers/spi/spi-pxa2xx.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 29e6025f104c..4f55c9647289 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1555,19 +1555,13 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) } #endif -#if CONFIG_OF - if (of_id) { - pdata->is_slave = of_property_read_bool(pdev->dev.of_node, - "spi-slave"); - } -#endif - ssp->clk = devm_clk_get(&pdev->dev, NULL); ssp->irq = platform_get_irq(pdev, 0); ssp->type = type; ssp->pdev = pdev; ssp->port_id = pxa2xx_spi_get_port_id(adev); + pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave"); pdata->num_chipselect = 1; pdata->enable_dma = true;