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 8735C2F3636; Tue, 18 Nov 2025 00:50:57 +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=1763427057; cv=none; b=D4V3fQ1qpUEw5c1IwlG6BDM/7nw+xCx4xqrBTw1YWLxOrI0oGA+ZvWTaZRh2VsCUp47tteAJEdqN1Fe2/oEqQepyLoO/yjGersmi2MzPYHC4cTd6ksNJsyfhCR08/iGxz+QHacbvMOqpQWD5SFOczVsNyjuPOzZo8gI3A9fMpl0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763427057; c=relaxed/simple; bh=eOHQgrB5skHPcM2HqeXjcVrG1cllA/I5abBZUOtgWzA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Cer4gFwhfUaoc6sUSLyDBEgM3e2LVgPz+s4jamXbzgMXLl5s+qDCtV4cgffMDBlGIDscUisCjjK8MOI4GoKZ++qFJljrTGQfxJHlOFRBF4HHVXaFkNGiB9HPY83t0gslYYkyuezN7SVBCCO8RwKWFKQXJNRiyVW2abh0SJ328lU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GtPdDfjX; 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="GtPdDfjX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE7C4C116B1; Tue, 18 Nov 2025 00:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763427056; bh=eOHQgrB5skHPcM2HqeXjcVrG1cllA/I5abBZUOtgWzA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GtPdDfjXvMf42P6ZmomvHghS1hTPvc9iNhLLk4uxXAhRU5LstSDuGdkaUzdJttu/N hJMKE3/cbZiuGJuRDAyZSIUPI7t9+FpQT/58pN2k9PgZDVZImhuUljWG2bV4yju0kb RYy/jG+rL18vQFh+Lu+RXvoCA/1ZkOTHf+kYLWdt/7a3AXEt3lcWQkx725aZ+EPGBk 4RQT3n5mPXj0FUKK93SH1TM8MYbO/J8+E6U1uUlUaMk1fsvQ2/xhxSq7147hRNi01o K9i1nb0ir3xRZBwNGs3upwIL3taHL3w5EuD0qDEE9m4JvcYRlkQQlzHICsYijWGMdq tznJoVPsTuciw== 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 v2 06/15] gpio: ml-ioh: Use modern PM macros Date: Tue, 18 Nov 2025 08:32:20 +0800 Message-ID: <20251118003229.26636-7-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251118003229.26636-1-jszhang@kernel.org> References: <20251118003229.26636-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: Andy Shevchenko --- drivers/gpio/gpio-ml-ioh.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c index f6af81bf2b13..6576e5dcb0ee 100644 --- a/drivers/gpio/gpio-ml-ioh.c +++ b/drivers/gpio/gpio-ml-ioh.c @@ -160,7 +160,7 @@ static int ioh_gpio_direction_input(struct gpio_chip *gpio, unsigned nr) /* * Save register configuration and disable interrupts. */ -static void __maybe_unused ioh_gpio_save_reg_conf(struct ioh_gpio *chip) +static void ioh_gpio_save_reg_conf(struct ioh_gpio *chip) { int i; @@ -186,7 +186,7 @@ static void __maybe_unused ioh_gpio_save_reg_conf(struct ioh_gpio *chip) /* * This function restores the register configuration of the GPIO device. */ -static void __maybe_unused ioh_gpio_restore_reg_conf(struct ioh_gpio *chip) +static void ioh_gpio_restore_reg_conf(struct ioh_gpio *chip) { int i; @@ -479,7 +479,7 @@ static int ioh_gpio_probe(struct pci_dev *pdev, return 0; } -static int __maybe_unused ioh_gpio_suspend(struct device *dev) +static int ioh_gpio_suspend(struct device *dev) { struct ioh_gpio *chip = dev_get_drvdata(dev); unsigned long flags; @@ -491,7 +491,7 @@ static int __maybe_unused ioh_gpio_suspend(struct device *dev) return 0; } -static int __maybe_unused ioh_gpio_resume(struct device *dev) +static int ioh_gpio_resume(struct device *dev) { struct ioh_gpio *chip = dev_get_drvdata(dev); unsigned long flags; @@ -505,7 +505,7 @@ static int __maybe_unused ioh_gpio_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(ioh_gpio_pm_ops, ioh_gpio_suspend, ioh_gpio_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(ioh_gpio_pm_ops, ioh_gpio_suspend, ioh_gpio_resume); static const struct pci_device_id ioh_gpio_pcidev_id[] = { { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x802E) }, @@ -518,7 +518,7 @@ static struct pci_driver ioh_gpio_driver = { .id_table = ioh_gpio_pcidev_id, .probe = ioh_gpio_probe, .driver = { - .pm = &ioh_gpio_pm_ops, + .pm = pm_sleep_ptr(&ioh_gpio_pm_ops), }, }; -- 2.51.0