diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-11-24 22:31:28 +0300 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-12-07 16:50:29 +0300 |
commit | fd58bb8c7da3c2d4314d7ab76402ca18e9cc0afa (patch) | |
tree | a36c747a3e0938785dd3f53d0e4377df2af7bfc8 /drivers/mfd/intel-lpss-acpi.c | |
parent | 24ee97a9e816a333688141eed2fbbb2d5e60b5d1 (diff) | |
download | linux-fd58bb8c7da3c2d4314d7ab76402ca18e9cc0afa.tar.xz |
mfd: intel-lpss: Provide Intel LPSS PM ops structure
With the help of EXPORT_NS_GPL_DEV_PM_OPS() and other *_PM_OPS() macros
we may convert PM ops functions to become static. This also takes into
account the PM configuration options such as CONFIG_PM and CONFIG_PM_SLEEP.
This all removes a lot of ugly macros and ifdeffery in the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231124200258.3682979-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd/intel-lpss-acpi.c')
-rw-r--r-- | drivers/mfd/intel-lpss-acpi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c index a9e2d9308a01..2a83f8678f1d 100644 --- a/drivers/mfd/intel-lpss-acpi.c +++ b/drivers/mfd/intel-lpss-acpi.c @@ -13,6 +13,7 @@ #include <linux/ioport.h> #include <linux/mod_devicetable.h> #include <linux/module.h> +#include <linux/pm.h> #include <linux/pm_runtime.h> #include <linux/platform_device.h> #include <linux/property.h> @@ -205,15 +206,13 @@ static void intel_lpss_acpi_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -static INTEL_LPSS_PM_OPS(intel_lpss_acpi_pm_ops); - static struct platform_driver intel_lpss_acpi_driver = { .probe = intel_lpss_acpi_probe, .remove_new = intel_lpss_acpi_remove, .driver = { .name = "intel-lpss", .acpi_match_table = intel_lpss_acpi_ids, - .pm = &intel_lpss_acpi_pm_ops, + .pm = pm_ptr(&intel_lpss_pm_ops), }, }; |