Skip to content

Commit 07612a7

Browse files
raagjadavUwe Kleine-König
authored andcommitted
pwm: lpss: use devm_pm_runtime_enable() helper
Use devm_pm_runtime_enable() helper to enable runtime PM and drop redundant platform ->remove() callback. Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Raag Jadav <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
1 parent 7cea05a commit 07612a7

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

drivers/pwm/pwm-lpss-platform.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,7 @@ static int pwm_lpss_probe_platform(struct platform_device *pdev)
5555
DPM_FLAG_SMART_SUSPEND);
5656

5757
pm_runtime_set_active(&pdev->dev);
58-
pm_runtime_enable(&pdev->dev);
59-
60-
return 0;
61-
}
62-
63-
static void pwm_lpss_remove_platform(struct platform_device *pdev)
64-
{
65-
pm_runtime_disable(&pdev->dev);
58+
return devm_pm_runtime_enable(&pdev->dev);
6659
}
6760

6861
static const struct acpi_device_id pwm_lpss_acpi_match[] = {
@@ -80,7 +73,6 @@ static struct platform_driver pwm_lpss_driver_platform = {
8073
.acpi_match_table = pwm_lpss_acpi_match,
8174
},
8275
.probe = pwm_lpss_probe_platform,
83-
.remove_new = pwm_lpss_remove_platform,
8476
};
8577
module_platform_driver(pwm_lpss_driver_platform);
8678

0 commit comments

Comments
 (0)