From patchwork Wed Oct 13 14:43:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12556061 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CDD4C433EF for ; Wed, 13 Oct 2021 14:43:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1585961175 for ; Wed, 13 Oct 2021 14:43:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236737AbhJMOpq (ORCPT ); Wed, 13 Oct 2021 10:45:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:51734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233744AbhJMOpq (ORCPT ); Wed, 13 Oct 2021 10:45:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 946D961166; Wed, 13 Oct 2021 14:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634136222; bh=WCBEv0rVg1t8NxfLzQI5AyH0vU8FITaub6xBor05cRM=; h=From:To:Cc:Subject:Date:From; b=TMFnOOkiDEDoma4gTjm08HzOkvkQjdUBIAMShJ4T6WPnB4vBPpb8fZQ7jIkufUZjq PbjPHPaSJQJkilsMcJ67ZvQwBBKg6mECMmyB8IDJw2TNHR4sTmDLIXat6Uf0y/sNaS cCVb8/6Njh6t6vCShpII1DkfKGiJmO+sT0r/K9Ob91z9P3UIj5MLrl0G5H9xOG78CB XQP4ylY36gUgm6f8OeFZ07tnzWFHdiiUoIJZ+e9uJrGvsJDc9W/Tam5QWTv3L6SoOM nv2uTDdc6F3c8M+T3eUdURon0C+gbgPNlTOAQboL1fLABbIIUn6xqs1c45mC01lYtr hJEIpDEa/PBpw== From: Arnd Bergmann To: Cai Huoqing , Jonathan Cameron , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Arnd Bergmann , Lars-Peter Clausen , Pengutronix Kernel Team , NXP Linux Team , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] iio: imx8qxp-adc: mark PM functions as __maybe_unused Date: Wed, 13 Oct 2021 16:43:26 +0200 Message-Id: <20211013144338.2261316-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Arnd Bergmann Without CONFIG_PM_SLEEP, the runtime suspend/resume functions are unused, producing a warning: drivers/iio/adc/imx8qxp-adc.c:433:12: error: 'imx8qxp_adc_runtime_resume' defined but not used [-Werror=unused-function] 433 | static int imx8qxp_adc_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/adc/imx8qxp-adc.c:419:12: error: 'imx8qxp_adc_runtime_suspend' defined but not used [-Werror=unused-function] 419 | static int imx8qxp_adc_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Mark them as __maybe_unused to shut up the compiler. Fixes: 7bce634d02e6 ("iio: imx8qxp-adc: Add driver support for NXP IMX8QXP ADC") Signed-off-by: Arnd Bergmann Reviewed-by: Cai Huoqing --- drivers/iio/adc/imx8qxp-adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/imx8qxp-adc.c b/drivers/iio/adc/imx8qxp-adc.c index 5030e0d8318d..901dd8e1b32f 100644 --- a/drivers/iio/adc/imx8qxp-adc.c +++ b/drivers/iio/adc/imx8qxp-adc.c @@ -416,7 +416,7 @@ static int imx8qxp_adc_remove(struct platform_device *pdev) return 0; } -static int imx8qxp_adc_runtime_suspend(struct device *dev) +static __maybe_unused int imx8qxp_adc_runtime_suspend(struct device *dev) { struct iio_dev *indio_dev = dev_get_drvdata(dev); struct imx8qxp_adc *adc = iio_priv(indio_dev); @@ -430,7 +430,7 @@ static int imx8qxp_adc_runtime_suspend(struct device *dev) return 0; } -static int imx8qxp_adc_runtime_resume(struct device *dev) +static __maybe_unused int imx8qxp_adc_runtime_resume(struct device *dev) { struct iio_dev *indio_dev = dev_get_drvdata(dev); struct imx8qxp_adc *adc = iio_priv(indio_dev);