return 0;
}
-static int __maybe_unused cyapa_suspend(struct device *dev)
+static int cyapa_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct cyapa *cyapa = i2c_get_clientdata(client);
return 0;
}
-static int __maybe_unused cyapa_resume(struct device *dev)
+static int cyapa_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct cyapa *cyapa = i2c_get_clientdata(client);
return 0;
}
-static int __maybe_unused cyapa_runtime_suspend(struct device *dev)
+static int cyapa_runtime_suspend(struct device *dev)
{
struct cyapa *cyapa = dev_get_drvdata(dev);
int error;
return 0;
}
-static int __maybe_unused cyapa_runtime_resume(struct device *dev)
+static int cyapa_runtime_resume(struct device *dev)
{
struct cyapa *cyapa = dev_get_drvdata(dev);
int error;
}
static const struct dev_pm_ops cyapa_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(cyapa_suspend, cyapa_resume)
- SET_RUNTIME_PM_OPS(cyapa_runtime_suspend, cyapa_runtime_resume, NULL)
+ SYSTEM_SLEEP_PM_OPS(cyapa_suspend, cyapa_resume)
+ RUNTIME_PM_OPS(cyapa_runtime_suspend, cyapa_runtime_resume, NULL)
};
static const struct i2c_device_id cyapa_id_table[] = {
static struct i2c_driver cyapa_driver = {
.driver = {
.name = "cyapa",
- .pm = &cyapa_pm_ops,
+ .pm = pm_ptr(&cyapa_pm_ops),
.acpi_match_table = ACPI_PTR(cyapa_acpi_id),
.of_match_table = of_match_ptr(cyapa_of_match),
},