summaryrefslogtreecommitdiff
path: root/drivers/mfd/max77620.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/max77620.c')
-rw-r--r--drivers/mfd/max77620.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c
index a6661e07035b..cbd2297126f0 100644
--- a/drivers/mfd/max77620.c
+++ b/drivers/mfd/max77620.c
@@ -494,9 +494,9 @@ static void max77620_pm_power_off(void)
MAX77620_ONOFFCNFG1_SFT_RST);
}
-static int max77620_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int max77620_probe(struct i2c_client *client)
{
+ const struct i2c_device_id *id = i2c_client_get_device_id(client);
const struct regmap_config *rmap_config;
struct max77620_chip *chip;
const struct mfd_cell *mfd_cells;
@@ -576,7 +576,6 @@ static int max77620_probe(struct i2c_client *client,
return 0;
}
-#ifdef CONFIG_PM_SLEEP
static int max77620_set_fps_period(struct max77620_chip *chip,
int fps_id, int time_period)
{
@@ -683,7 +682,6 @@ out:
return 0;
}
-#endif
static const struct i2c_device_id max77620_id[] = {
{"max77620", MAX77620},
@@ -692,16 +690,15 @@ static const struct i2c_device_id max77620_id[] = {
{},
};
-static const struct dev_pm_ops max77620_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(max77620_i2c_suspend, max77620_i2c_resume)
-};
+static DEFINE_SIMPLE_DEV_PM_OPS(max77620_pm_ops,
+ max77620_i2c_suspend, max77620_i2c_resume);
static struct i2c_driver max77620_driver = {
.driver = {
.name = "max77620",
- .pm = &max77620_pm_ops,
+ .pm = pm_sleep_ptr(&max77620_pm_ops),
},
- .probe = max77620_probe,
+ .probe_new = max77620_probe,
.id_table = max77620_id,
};
builtin_i2c_driver(max77620_driver);