From patchwork Thu Oct 27 13:10:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13022132 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92D2BECAAA1 for ; Thu, 27 Oct 2022 13:17:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VvutzAgYiqkREoFuPQxpnIK+du02m124iEGuKjJP2wY=; b=zIPhqMHv6y/ASY ZT2KwW6z6/mYKJaTsXB6i78GwtzknrvwpWYCWIZn02Fq6wKtVEzPdXTWpWf6mva+6l+2JwawiewwS +uoNMCK/UvEqSwnVdaCnOQeSzqMSWYKMkEZqnfR0WzKi5Ap2l+t6PYR9lg0fSC4x32sbimHyYIQ+j hoqFHcx4cHOrtuKzaw0NzI6YSFGcFjfiSyEldBePKmN1XKoQwIxHKZWLnZKShERuNI+l0SyZalez/ Tq0YbvmKtqjjC54eIkHREwjQWyzwtK26DpcCXoZqruBCHLLk4Vj5pS4pt79hgrfxfzzGEo7HhUsPO ujvi1QOpSnzbmJCo8nww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oo2jk-00DOuI-FW; Thu, 27 Oct 2022 13:15:57 +0000 Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oo2ec-00DMlR-Im for linux-arm-kernel@lists.infradead.org; Thu, 27 Oct 2022 13:10:40 +0000 Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed10:53a:31ee:412:433f]) by michel.telenet-ops.be with bizsmtp id d1AW2800P5LQXpN061AWZg; Thu, 27 Oct 2022 15:10:32 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1oo2eT-001pe8-V4; Thu, 27 Oct 2022 15:10:29 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1oo2eT-00G6Wz-FL; Thu, 27 Oct 2022 15:10:29 +0200 From: Geert Uytterhoeven To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Vladimir Zapolskiy , Dmitry Torokhov Cc: linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , noreply@ellerman.id.au Subject: [PATCH 2/2] mtd: rawnand: lpc32xx_slc: Switch to using pm_ptr() Date: Thu, 27 Oct 2022 15:10:28 +0200 Message-Id: <20221027131028.3838303-2-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221027131028.3838303-1-geert@linux-m68k.org> References: <20221027131028.3838303-1-geert@linux-m68k.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221027_061038_836009_AC4217BD X-CRM114-Status: GOOD ( 14.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The switch to using the gpiod API removed the last user of lpc32xx_wp_disable() outside #ifdef CONFIG_PM, causing build failures if CONFIG_PM=n: drivers/mtd/nand/raw/lpc32xx_slc.c:318:13: error: ‘lpc32xx_wp_disable’ defined but not used [-Werror=unused-function] 318 | static void lpc32xx_wp_disable(struct lpc32xx_nand_host *host) | ^~~~~~~~~~~~~~~~~~ Fix this by switching from #ifdef CONFIG_PM to pm_ptr(), increasing compile-coverage as a side-effect. Reported-by: noreply@ellerman.id.au Fixes: 6b923db2867cb5e1 ("mtd: rawnand: lpc32xx_slc: switch to using gpiod API") Signed-off-by: Geert Uytterhoeven --- drivers/mtd/nand/raw/lpc32xx_slc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/raw/lpc32xx_slc.c b/drivers/mtd/nand/raw/lpc32xx_slc.c index 4702577f74e5dae4..6918737346c95c8a 100644 --- a/drivers/mtd/nand/raw/lpc32xx_slc.c +++ b/drivers/mtd/nand/raw/lpc32xx_slc.c @@ -969,7 +969,6 @@ static int lpc32xx_nand_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM static int lpc32xx_nand_resume(struct platform_device *pdev) { struct lpc32xx_nand_host *host = platform_get_drvdata(pdev); @@ -1008,11 +1007,6 @@ static int lpc32xx_nand_suspend(struct platform_device *pdev, pm_message_t pm) return 0; } -#else -#define lpc32xx_nand_resume NULL -#define lpc32xx_nand_suspend NULL -#endif - static const struct of_device_id lpc32xx_nand_match[] = { { .compatible = "nxp,lpc3220-slc" }, { /* sentinel */ }, @@ -1022,8 +1016,8 @@ MODULE_DEVICE_TABLE(of, lpc32xx_nand_match); static struct platform_driver lpc32xx_nand_driver = { .probe = lpc32xx_nand_probe, .remove = lpc32xx_nand_remove, - .resume = lpc32xx_nand_resume, - .suspend = lpc32xx_nand_suspend, + .resume = pm_ptr(lpc32xx_nand_resume), + .suspend = pm_ptr(lpc32xx_nand_suspend), .driver = { .name = LPC32XX_MODNAME, .of_match_table = lpc32xx_nand_match,