Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933396AbeAKKfu (ORCPT + 1 other); Thu, 11 Jan 2018 05:35:50 -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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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; -- 2.9.0