]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
pwm: lpss: use devm_pm_runtime_enable() helper
authorRaag Jadav <raag.jadav@intel.com>
Wed, 5 Jun 2024 13:15:32 +0000 (18:45 +0530)
committerUwe Kleine-König <ukleinek@kernel.org>
Wed, 10 Jul 2024 15:53:51 +0000 (17:53 +0200)
Use devm_pm_runtime_enable() helper to enable runtime PM and drop redundant
platform ->remove() callback.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Link: https://lore.kernel.org/r/20240605131533.20037-2-raag.jadav@intel.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/pwm-lpss-platform.c

index dbc9f5b17bdc2f42594f732f499f8dc957f0ba0d..5130238a45670c363249993e70b40ec202e52100 100644 (file)
@@ -55,14 +55,7 @@ static int pwm_lpss_probe_platform(struct platform_device *pdev)
                                                    DPM_FLAG_SMART_SUSPEND);
 
        pm_runtime_set_active(&pdev->dev);
-       pm_runtime_enable(&pdev->dev);
-
-       return 0;
-}
-
-static void pwm_lpss_remove_platform(struct platform_device *pdev)
-{
-       pm_runtime_disable(&pdev->dev);
+       return devm_pm_runtime_enable(&pdev->dev);
 }
 
 static const struct acpi_device_id pwm_lpss_acpi_match[] = {
@@ -80,7 +73,6 @@ static struct platform_driver pwm_lpss_driver_platform = {
                .acpi_match_table = pwm_lpss_acpi_match,
        },
        .probe = pwm_lpss_probe_platform,
-       .remove_new = pwm_lpss_remove_platform,
 };
 module_platform_driver(pwm_lpss_driver_platform);