clk: rs9: Convert to DEFINE_SIMPLE_DEV_PM_OPS()

Convert the Renesas 9-series PCIe clock generator 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 <geert+renesas@glider.be>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
Geert Uytterhoeven 2026-01-21 12:03:11 +01:00 committed by Stephen Boyd
parent 5ec820fc28
commit 37eb3349a3
No known key found for this signature in database
GPG key ID: AD028897C6E49525

View file

@ -354,7 +354,7 @@ static int rs9_probe(struct i2c_client *client)
return ret;
}
static int __maybe_unused rs9_suspend(struct device *dev)
static int rs9_suspend(struct device *dev)
{
struct rs9_driver_data *rs9 = dev_get_drvdata(dev);
@ -364,7 +364,7 @@ static int __maybe_unused rs9_suspend(struct device *dev)
return 0;
}
static int __maybe_unused rs9_resume(struct device *dev)
static int rs9_resume(struct device *dev)
{
struct rs9_driver_data *rs9 = dev_get_drvdata(dev);
int ret;
@ -410,12 +410,12 @@ static const struct of_device_id clk_rs9_of_match[] = {
};
MODULE_DEVICE_TABLE(of, clk_rs9_of_match);
static SIMPLE_DEV_PM_OPS(rs9_pm_ops, rs9_suspend, rs9_resume);
static DEFINE_SIMPLE_DEV_PM_OPS(rs9_pm_ops, rs9_suspend, rs9_resume);
static struct i2c_driver rs9_driver = {
.driver = {
.name = "clk-renesas-pcie-9series",
.pm = &rs9_pm_ops,
.pm = pm_sleep_ptr(&rs9_pm_ops),
.of_match_table = clk_rs9_of_match,
},
.probe = rs9_probe,