From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E57035BDC5; Wed, 19 Nov 2025 16:51:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763571115; cv=none; b=LYwEA76Ag5l53PVHepYCLDHuHgOULIGZUX+eSE5aL4/GVonbQj7Thcyp/RnEt8gdFlDhqVr69eYof61uDZKxtSTg21cxShojvArcnvQHuGiqJZzdV1SrUJele0IsSHQ73NeB3zJEdBC2jaFFi/GLl7+8NtEL936d0phBHj5YIVw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763571115; c=relaxed/simple; bh=3m03+o1uul0EMqM9dDxOK/eGbWfiEkDRYFrWiLilPvE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Jc3DNP51YKAl0B74ZgVcTboLfy0ozcJMXWyHGtGKOSS9GDc74OYSh8UWo98MC604wpiLXX+4r7W25j5SNT+o6P2Q7TBGE1sETlIW+btsPHVqeksGX7WGBs8sWtR18eF4PXs935fI1mbUKx+uxctzyWmAgUBMaltEJIcj/VftiMU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a8cLEvHy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a8cLEvHy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CE50C4CEF5; Wed, 19 Nov 2025 16:51:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763571115; bh=3m03+o1uul0EMqM9dDxOK/eGbWfiEkDRYFrWiLilPvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a8cLEvHynyCIHxSr9bCntp1znvd1VnzvutbMsC2Z5TrWvNGgJo7qe5wrFPyvnZFey U4iT9bY6G8k+nQRzIXnWEE/oJPhvsI43EK0Ojr2KZfp6DO6xixyHlmWva0Mjhsc+BG x6SOIL8LYz9Pof/iqSENv2LzlpvtknOnTyWi2fE4NU8Z0sBYlXZLsJqHzh5CZaw7bj AIm+knCk/k3Xg6w05kUMz87NdRhy5hn2/copp1IyiV9PixTiqW/YeLaDFJA0yf/EwZ 7LPik6l0jKUIm2YJnAHpKLP9kNR2RWSUEph1aT/KvlGoybCRSBmfaQ2f+Eb0kxo/8K 0cKXXy0M6u5oQ== From: Jisheng Zhang To: Doug Berger , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Linus Walleij , Bartosz Golaszewski , Hoan Tran , Andy Shevchenko , Daniel Palmer , Romain Perier , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , Robert Jarzmik , Kunihiko Hayashi , Masami Hiramatsu , Shubhrajyoti Datta , Srinivas Neeli , Michal Simek Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH v4 08/15] gpio: msc313: Use modern PM macros Date: Thu, 20 Nov 2025 00:33:20 +0800 Message-ID: <20251119163327.16306-9-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251119163327.16306-1-jszhang@kernel.org> References: <20251119163327.16306-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused Signed-off-by: Jisheng Zhang Acked-by: Linus Walleij --- drivers/gpio/gpio-msc313.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-msc313.c b/drivers/gpio/gpio-msc313.c index b0cccd856840..7345afdc78de 100644 --- a/drivers/gpio/gpio-msc313.c +++ b/drivers/gpio/gpio-msc313.c @@ -694,7 +694,7 @@ static const struct of_device_id msc313_gpio_of_match[] = { * SoC goes into suspend to memory mode so we need to save some * of the register bits before suspending and put it back when resuming */ -static int __maybe_unused msc313_gpio_suspend(struct device *dev) +static int msc313_gpio_suspend(struct device *dev) { struct msc313_gpio *gpio = dev_get_drvdata(dev); int i; @@ -705,7 +705,7 @@ static int __maybe_unused msc313_gpio_suspend(struct device *dev) return 0; } -static int __maybe_unused msc313_gpio_resume(struct device *dev) +static int msc313_gpio_resume(struct device *dev) { struct msc313_gpio *gpio = dev_get_drvdata(dev); int i; @@ -716,13 +716,13 @@ static int __maybe_unused msc313_gpio_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(msc313_gpio_ops, msc313_gpio_suspend, msc313_gpio_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(msc313_gpio_ops, msc313_gpio_suspend, msc313_gpio_resume); static struct platform_driver msc313_gpio_driver = { .driver = { .name = DRIVER_NAME, .of_match_table = msc313_gpio_of_match, - .pm = &msc313_gpio_ops, + .pm = pm_sleep_ptr(&msc313_gpio_ops), }, .probe = msc313_gpio_probe, }; -- 2.51.0