Skip to content

Commit 37eb334

Browse files
geertubebarino
authored andcommitted
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>
1 parent 5ec820f commit 37eb334

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/clk/clk-renesas-pcie.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static int rs9_probe(struct i2c_client *client)
354354
return ret;
355355
}
356356

357-
static int __maybe_unused rs9_suspend(struct device *dev)
357+
static int rs9_suspend(struct device *dev)
358358
{
359359
struct rs9_driver_data *rs9 = dev_get_drvdata(dev);
360360

@@ -364,7 +364,7 @@ static int __maybe_unused rs9_suspend(struct device *dev)
364364
return 0;
365365
}
366366

367-
static int __maybe_unused rs9_resume(struct device *dev)
367+
static int rs9_resume(struct device *dev)
368368
{
369369
struct rs9_driver_data *rs9 = dev_get_drvdata(dev);
370370
int ret;
@@ -410,12 +410,12 @@ static const struct of_device_id clk_rs9_of_match[] = {
410410
};
411411
MODULE_DEVICE_TABLE(of, clk_rs9_of_match);
412412

413-
static SIMPLE_DEV_PM_OPS(rs9_pm_ops, rs9_suspend, rs9_resume);
413+
static DEFINE_SIMPLE_DEV_PM_OPS(rs9_pm_ops, rs9_suspend, rs9_resume);
414414

415415
static struct i2c_driver rs9_driver = {
416416
.driver = {
417417
.name = "clk-renesas-pcie-9series",
418-
.pm = &rs9_pm_ops,
418+
.pm = pm_sleep_ptr(&rs9_pm_ops),
419419
.of_match_table = clk_rs9_of_match,
420420
},
421421
.probe = rs9_probe,

0 commit comments

Comments
 (0)