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: Convert to DEFINE_SIMPLE_DEV_PM_OPS()

Convert the Renesas R-Car thermal driver from SIMPLE_DEV_PM_OPS() to
DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr(). This lets us drop the
check for CONFIG_PM_SLEEP, and reduces kernel size in case CONFIG_PM or
CONFIG_PM_SLEEP is disabled, while increasing build coverage.

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/ee03ec71d10fd589e7458fa1b0ada3d3c19dbb54.1763117351.git.geert+renesas@glider.be

authored by

Geert Uytterhoeven and committed by
Daniel Lezcano
186b5c27 b1c4c05b

+3 -5
+3 -5
drivers/thermal/renesas/rcar_thermal.c
··· 534 534 return ret; 535 535 } 536 536 537 - #ifdef CONFIG_PM_SLEEP 538 537 static int rcar_thermal_suspend(struct device *dev) 539 538 { 540 539 struct rcar_thermal_common *common = dev_get_drvdata(dev); ··· 566 567 567 568 return 0; 568 569 } 569 - #endif 570 570 571 - static SIMPLE_DEV_PM_OPS(rcar_thermal_pm_ops, rcar_thermal_suspend, 572 - rcar_thermal_resume); 571 + static DEFINE_SIMPLE_DEV_PM_OPS(rcar_thermal_pm_ops, rcar_thermal_suspend, 572 + rcar_thermal_resume); 573 573 574 574 static struct platform_driver rcar_thermal_driver = { 575 575 .driver = { 576 576 .name = "rcar_thermal", 577 - .pm = &rcar_thermal_pm_ops, 577 + .pm = pm_sleep_ptr(&rcar_thermal_pm_ops), 578 578 .of_match_table = rcar_thermal_dt_ids, 579 579 }, 580 580 .probe = rcar_thermal_probe,