From patchwork Thu Jan 11 10:34:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10157797 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 03AE7601A1 for ; Thu, 11 Jan 2018 10:35:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7D722850D for ; Thu, 11 Jan 2018 10:35:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBE1A28684; Thu, 11 Jan 2018 10:35:49 +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=-6.9 required=2.0 tests=BAYES_00,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 6C10E2850D for ; Thu, 11 Jan 2018 10:35:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933177AbeAKKfs (ORCPT ); Thu, 11 Jan 2018 05:35:48 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:61925 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932990AbeAKKfs (ORCPT ); Thu, 11 Jan 2018 05:35:48 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.129]) with ESMTPA (Nemesis) id 0LfcGk-1fEuQk1YgE-00pJO8; Thu, 11 Jan 2018 11:35:12 +0100 From: Arnd Bergmann To: Mark Brown Cc: Arnd Bergmann , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Maxime Coquelin , Alexandre Torgue , Arnaud Pouliquen , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] IIO: ADC: stm32-dfsdm: avoid unused-variable warning Date: Thu, 11 Jan 2018 11:34:46 +0100 Message-Id: <20180111103510.1408292-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:jmcJ+KgfUzSclBGVet1hfvP2XAPfGRK5u2CLmF6zbe3Ci6WKwDp uRBkuE22+2PTwn7RVfqo5ImW9RkvRPcQ7xnvYmHuc/J3HKljzlV/5Dh+zBfLkYa5VKm81Mm A8mIQ9eHPDdYyF4328eyUdGV8UUxI4qcpIXNFxZgbAKdXmqmTWI2EmUilyNslb07f8HHcKN x5b/1H+0sus2FvEjZVLSA== X-UI-Out-Filterresults: notjunk:1; V01:K0:HRZUd4NtHe4=:bujCrPytk6+ByvYFWKK4It a563o/KsSdlzW8AN+CDmfPRL0Cf+xerlm43xr9b3Os+1COfxkXBRK2SZx3P6B6RaAC3dRmLcQ +hvildV9kVX9f89PdRLHyoQTRGBoytV3NvizXl047vHDJsRas1cmcT5bQ8dxVmqaNpXD5XUT5 l4OOA9kwj+1zc5mUG/mththMKyCe/h+LKLwqkxEW6TRKyUvd1LtUqMRkkoCJgBiPjCo1lz8I5 UXgKYP/LhAf4DgEEaaOsgepBy9ppHa4nXJZzlO0XOA7p3AbfdIKqmt6Rk5LHcP7PwWd4gs/U1 lQIpCXWF12LtmyogTzbmpLrvAmOj/rHe259Z4d6JqhNHXM0/QqiZ282ai3Wpc9RAM5OY0fBe5 dFAX44g9agNGLiuQp+nOFVa5ZEmODYmcE9YsjAhnamggaVGAAHlha9xJm0tTSqizwWnO3CR4e BGiura2C8MPosW4BZykSmJwr3MYmKipYmXzARpwd1FMV/W58sO6gh5fIlH0IXyCeD+cbRuOKh yHUVZbv4nx9gJQr86IYTF1rMbOhL0p8hKqZnbdLd8HPsR7i9q/uUVOq4hSZK5Ni6TuV6fQD7L tRPym8YO0tcvRnEw72031iAPDtL8Hhkfj4w75nE9F2XGzgZS77e+8JeYN8wum2K37FbCEOIrS HXB+aIspx1EASKfOv9zNlhcDpr4hLkQJZGZXi1v+G2jmsv6RzdXhLh7Tj7ffJ/bB3gHnHgfZq idTLZ05eY7tp4euoUHYT85tK1YYFZXAUCqWlSA== Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Building with CONFIG_OF disabled produces a compiler warning: drivers/iio/adc/stm32-dfsdm-core.c: In function 'stm32_dfsdm_probe': drivers/iio/adc/stm32-dfsdm-core.c:245:22: error: unused variable 'pnode' [-Werror=unused-variable] This removes the variable and open-codes it in the only place it gets used to avoid that warning. Fixes: bed73904e76f ("IIO: ADC: add stm32 DFSDM core support") Signed-off-by: Arnd Bergmann --- drivers/iio/adc/stm32-dfsdm-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/adc/stm32-dfsdm-core.c b/drivers/iio/adc/stm32-dfsdm-core.c index 72427414db7f..6cd655f8239b 100644 --- a/drivers/iio/adc/stm32-dfsdm-core.c +++ b/drivers/iio/adc/stm32-dfsdm-core.c @@ -242,7 +242,6 @@ MODULE_DEVICE_TABLE(of, stm32_dfsdm_of_match); static int stm32_dfsdm_probe(struct platform_device *pdev) { struct dfsdm_priv *priv; - struct device_node *pnode = pdev->dev.of_node; const struct of_device_id *of_id; const struct stm32_dfsdm_dev_data *dev_data; struct stm32_dfsdm *dfsdm; @@ -254,7 +253,7 @@ static int stm32_dfsdm_probe(struct platform_device *pdev) priv->pdev = pdev; - of_id = of_match_node(stm32_dfsdm_of_match, pnode); + of_id = of_match_node(stm32_dfsdm_of_match, pdev->dev.of_node); if (!of_id->data) { dev_err(&pdev->dev, "Data associated to device is missing\n"); return -EINVAL;