summaryrefslogtreecommitdiff
path: root/drivers/hwmon/max31730.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/max31730.c')
-rw-r--r--drivers/hwmon/max31730.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/max31730.c b/drivers/hwmon/max31730.c
index 23598b8b8793..746a767c9fc6 100644
--- a/drivers/hwmon/max31730.c
+++ b/drivers/hwmon/max31730.c
@@ -399,33 +399,33 @@ static int max31730_detect(struct i2c_client *client,
return -ENODEV;
}
- strlcpy(info->type, "max31730", I2C_NAME_SIZE);
+ strscpy(info->type, "max31730", I2C_NAME_SIZE);
return 0;
}
-static int __maybe_unused max31730_suspend(struct device *dev)
+static int max31730_suspend(struct device *dev)
{
struct max31730_data *data = dev_get_drvdata(dev);
return max31730_write_config(data, MAX31730_STOP, 0);
}
-static int __maybe_unused max31730_resume(struct device *dev)
+static int max31730_resume(struct device *dev)
{
struct max31730_data *data = dev_get_drvdata(dev);
return max31730_write_config(data, 0, MAX31730_STOP);
}
-static SIMPLE_DEV_PM_OPS(max31730_pm_ops, max31730_suspend, max31730_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(max31730_pm_ops, max31730_suspend, max31730_resume);
static struct i2c_driver max31730_driver = {
.class = I2C_CLASS_HWMON,
.driver = {
.name = "max31730",
.of_match_table = of_match_ptr(max31730_of_match),
- .pm = &max31730_pm_ops,
+ .pm = pm_sleep_ptr(&max31730_pm_ops),
},
.probe_new = max31730_probe,
.id_table = max31730_ids,