From nobody Tue Oct 7 12:29:47 2025 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 14BA71F63D9; Wed, 9 Jul 2025 19:01:25 +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=1752087685; cv=none; b=JJoIKYyYvNxCL1KAvU1YLSW81RaYfIJ+I6PhQg4G6c3xh3CzNbFjrIT+lvWtDutaWOcF4CZkZZOdMrSmzoqEWQgbKjuMUq60vJtifecpSFsv5tlm/oOoYnfTC9XINdXt3rgdtcgQwZrcE0GQz31f8x30IETQJounXzK7V0IDnIc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752087685; c=relaxed/simple; bh=wSR0kEid9wsA6jwGEKFrLZ9x+P2yYmI58utH+96AOno=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nggF5U6ifOYbTYts9+F83E77BcEODRw/40AXPD4zPR/zjrhye8QGNS/Yguyps3DQyQSJDouTJuG8Jns8jeEQtCqOnSGH9Dn7Vi3eYkdzj+VQc44a9CbElBMMj9JZuKuYTxfEspQgV72VG/XGbae+I1otbnJiZASqDZf4fDchyFU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 627E1C4CEEF; Wed, 9 Jul 2025 19:01:23 +0000 (UTC) From: Geert Uytterhoeven To: Greg Kroah-Hartman , Jiri Slaby , Wolfram Sang Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] serial: sh-sci: Convert to DEFINE_SIMPLE_DEV_PM_OPS() Date: Wed, 9 Jul 2025 21:01:20 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert the Renesas SuperH SCI(F) serial port driver from SIMPLE_DEV_PM_OPS() to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr(). This lets us drop the __maybe_unused annotations from its suspend and resume callbacks, and reduces kernel size in case CONFIG_PM or CONFIG_PM_SLEEP is disabled. Signed-off-by: Geert Uytterhoeven --- drivers/tty/serial/sh-sci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 1c356544a832a0c2..fa5773f56a7e577e 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -3702,7 +3702,7 @@ static int sci_probe(struct platform_device *dev) return 0; } =20 -static __maybe_unused int sci_suspend(struct device *dev) +static int sci_suspend(struct device *dev) { struct sci_port *sport =3D dev_get_drvdata(dev); =20 @@ -3720,7 +3720,7 @@ static __maybe_unused int sci_suspend(struct device *= dev) return 0; } =20 -static __maybe_unused int sci_resume(struct device *dev) +static int sci_resume(struct device *dev) { struct sci_port *sport =3D dev_get_drvdata(dev); =20 @@ -3741,14 +3741,14 @@ static __maybe_unused int sci_resume(struct device = *dev) return 0; } =20 -static SIMPLE_DEV_PM_OPS(sci_dev_pm_ops, sci_suspend, sci_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(sci_dev_pm_ops, sci_suspend, sci_resume); =20 static struct platform_driver sci_driver =3D { .probe =3D sci_probe, .remove =3D sci_remove, .driver =3D { .name =3D "sh-sci", - .pm =3D &sci_dev_pm_ops, + .pm =3D pm_sleep_ptr(&sci_dev_pm_ops), .of_match_table =3D of_match_ptr(of_sci_match), }, }; --=20 2.43.0