Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

thermal/drivers/rcar_gen3: Convert to DEFINE_SIMPLE_DEV_PM_OPS()

Convert the Renesas R-Car Gen3 thermal driver from SIMPLE_DEV_PM_OPS()
to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr(). This lets us drop the
__maybe_unused annotation from its resume callback, and reduces kernel
size in case CONFIG_PM or CONFIG_PM_SLEEP is disabled.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://patch.msgid.link/813ad36fdc8561cf1c396230436e8ff3ff903a1f.1763117455.git.geert+renesas@glider.be

authored by

Geert Uytterhoeven and committed by
Daniel Lezcano
a6eb1771 186b5c27

+4 -4
+4 -4
drivers/thermal/renesas/rcar_gen3_thermal.c
··· 601 601 return ret; 602 602 } 603 603 604 - static int __maybe_unused rcar_gen3_thermal_resume(struct device *dev) 604 + static int rcar_gen3_thermal_resume(struct device *dev) 605 605 { 606 606 struct rcar_gen3_thermal_priv *priv = dev_get_drvdata(dev); 607 607 unsigned int i; ··· 615 615 return 0; 616 616 } 617 617 618 - static SIMPLE_DEV_PM_OPS(rcar_gen3_thermal_pm_ops, NULL, 619 - rcar_gen3_thermal_resume); 618 + static DEFINE_SIMPLE_DEV_PM_OPS(rcar_gen3_thermal_pm_ops, NULL, 619 + rcar_gen3_thermal_resume); 620 620 621 621 static struct platform_driver rcar_gen3_thermal_driver = { 622 622 .driver = { 623 623 .name = "rcar_gen3_thermal", 624 - .pm = &rcar_gen3_thermal_pm_ops, 624 + .pm = pm_sleep_ptr(&rcar_gen3_thermal_pm_ops), 625 625 .of_match_table = rcar_gen3_thermal_dt_ids, 626 626 }, 627 627 .probe = rcar_gen3_thermal_probe,