static struct i2c_driver wm8804_i2c_driver = {
.driver = {
.name = "wm8804",
- .pm = &wm8804_pm,
+ .pm = pm_ptr(&wm8804_pm),
.of_match_table = of_match_ptr(wm8804_of_match),
.acpi_match_table = ACPI_PTR(wm8804_acpi_match),
},
static struct spi_driver wm8804_spi_driver = {
.driver = {
.name = "wm8804",
- .pm = &wm8804_pm,
+ .pm = pm_ptr(&wm8804_pm),
.of_match_table = wm8804_of_match,
},
.probe = wm8804_spi_probe,
}
EXPORT_SYMBOL_GPL(wm8804_remove);
-#if IS_ENABLED(CONFIG_PM)
static int wm8804_runtime_resume(struct device *dev)
{
struct wm8804_priv *wm8804 = dev_get_drvdata(dev);
return 0;
}
-#endif
-const struct dev_pm_ops wm8804_pm = {
- SET_RUNTIME_PM_OPS(wm8804_runtime_suspend, wm8804_runtime_resume, NULL)
+EXPORT_GPL_DEV_PM_OPS(wm8804_pm) = {
+ RUNTIME_PM_OPS(wm8804_runtime_suspend, wm8804_runtime_resume, NULL)
};
-EXPORT_SYMBOL_GPL(wm8804_pm);
MODULE_DESCRIPTION("ASoC WM8804 driver");
MODULE_AUTHOR("Dimitris Papastamos <dp@opensource.wolfsonmicro.com>");