]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gpio: tangier: use EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS() helper
authorRaag Jadav <raag.jadav@intel.com>
Mon, 13 Nov 2023 13:15:58 +0000 (18:45 +0530)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 13 Nov 2023 15:59:48 +0000 (17:59 +0200)
Use EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS() helper to export pm_ops to
GPIO_TANGIER namespace, so that they can be reused.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Link: https://lore.kernel.org/r/20231113131600.10828-2-raag.jadav@intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpio-tangier.c
drivers/gpio/gpio-tangier.h

index 7ce3eddaed2572b4b14431d8170dd1332292e297..52d0868476e1cf07334f66e7ec23664c9b96049d 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/math.h>
 #include <linux/module.h>
 #include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pm.h>
 #include <linux/spinlock.h>
 #include <linux/string_helpers.h>
 #include <linux/types.h>
@@ -531,6 +532,8 @@ int tng_gpio_resume(struct device *dev)
 }
 EXPORT_SYMBOL_NS_GPL(tng_gpio_resume, GPIO_TANGIER);
 
+EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS(tng_gpio_pm_ops, tng_gpio_suspend, tng_gpio_resume, GPIO_TANGIER);
+
 MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
 MODULE_AUTHOR("Pandith N <pandith.n@intel.com>");
 MODULE_AUTHOR("Raag Jadav <raag.jadav@intel.com>");
index 16c4f22908fb519dbb9fadc9c05725e0943b253f..333e5f79b908867b713083e446a517dadc596861 100644 (file)
@@ -13,6 +13,7 @@
 #define _GPIO_TANGIER_H_
 
 #include <linux/gpio/driver.h>
+#include <linux/pm.h>
 #include <linux/spinlock_types.h>
 #include <linux/types.h>
 
@@ -114,4 +115,6 @@ int devm_tng_gpio_probe(struct device *dev, struct tng_gpio *gpio);
 int tng_gpio_suspend(struct device *dev);
 int tng_gpio_resume(struct device *dev);
 
+extern const struct dev_pm_ops tng_gpio_pm_ops;
+
 #endif /* _GPIO_TANGIER_H_ */