@@ -383,8 +383,7 @@ static int jsa1212_remove(struct i2c_client *client)
return jsa1212_power_off(data);
}
-#ifdef CONFIG_PM_SLEEP
-static int jsa1212_suspend(struct device *dev)
+static __maybe_unused int jsa1212_suspend(struct device *dev)
{
struct jsa1212_data *data;
@@ -393,7 +392,7 @@ static int jsa1212_suspend(struct device *dev)
return jsa1212_power_off(data);
}
-static int jsa1212_resume(struct device *dev)
+static __maybe_unused int jsa1212_resume(struct device *dev)
{
int ret = 0;
struct jsa1212_data *data;
@@ -423,11 +422,6 @@ static int jsa1212_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(jsa1212_pm_ops, jsa1212_suspend, jsa1212_resume);
-#define JSA1212_PM_OPS (&jsa1212_pm_ops)
-#else
-#define JSA1212_PM_OPS NULL
-#endif
-
static const struct acpi_device_id jsa1212_acpi_match[] = {
{"JSA1212", 0},
{ },
@@ -443,7 +437,7 @@ MODULE_DEVICE_TABLE(i2c, jsa1212_id);
static struct i2c_driver jsa1212_driver = {
.driver = {
.name = JSA1212_DRIVER_NAME,
- .pm = JSA1212_PM_OPS,
+ .pm = pm_ptr(&jsa1212_pm_ops),
.acpi_match_table = ACPI_PTR(jsa1212_acpi_match),
},
.probe = jsa1212_probe,