Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: tangier: use EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS() helper

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>

authored by

Raag Jadav and committed by
Andy Shevchenko
fc84abc4 b85ea95d

+6
+3
drivers/gpio/gpio-tangier.c
··· 19 19 #include <linux/math.h> 20 20 #include <linux/module.h> 21 21 #include <linux/pinctrl/pinconf-generic.h> 22 + #include <linux/pm.h> 22 23 #include <linux/spinlock.h> 23 24 #include <linux/string_helpers.h> 24 25 #include <linux/types.h> ··· 531 530 return 0; 532 531 } 533 532 EXPORT_SYMBOL_NS_GPL(tng_gpio_resume, GPIO_TANGIER); 533 + 534 + EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS(tng_gpio_pm_ops, tng_gpio_suspend, tng_gpio_resume, GPIO_TANGIER); 534 535 535 536 MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); 536 537 MODULE_AUTHOR("Pandith N <pandith.n@intel.com>");
+3
drivers/gpio/gpio-tangier.h
··· 13 13 #define _GPIO_TANGIER_H_ 14 14 15 15 #include <linux/gpio/driver.h> 16 + #include <linux/pm.h> 16 17 #include <linux/spinlock_types.h> 17 18 #include <linux/types.h> 18 19 ··· 114 113 115 114 int tng_gpio_suspend(struct device *dev); 116 115 int tng_gpio_resume(struct device *dev); 116 + 117 + extern const struct dev_pm_ops tng_gpio_pm_ops; 117 118 118 119 #endif /* _GPIO_TANGIER_H_ */