diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/mfd/max14577.c | 2 | ||||
| -rw-r--r-- | drivers/mfd/max8997.c | 6 | ||||
| -rw-r--r-- | drivers/mfd/max8998.c | 6 | ||||
| -rw-r--r-- | drivers/mfd/sec-core.c | 2 | ||||
| -rw-r--r-- | drivers/mfd/tps65217.c | 4 | ||||
| -rw-r--r-- | drivers/mfd/wm8994-core.c | 2 |
6 files changed, 13 insertions, 9 deletions
diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c index ac514fb2b877..71aa14a6bfbb 100644 --- a/drivers/mfd/max14577.c +++ b/drivers/mfd/max14577.c | |||
| @@ -173,6 +173,7 @@ static const struct i2c_device_id max14577_i2c_id[] = { | |||
| 173 | }; | 173 | }; |
| 174 | MODULE_DEVICE_TABLE(i2c, max14577_i2c_id); | 174 | MODULE_DEVICE_TABLE(i2c, max14577_i2c_id); |
| 175 | 175 | ||
| 176 | #ifdef CONFIG_PM_SLEEP | ||
| 176 | static int max14577_suspend(struct device *dev) | 177 | static int max14577_suspend(struct device *dev) |
| 177 | { | 178 | { |
| 178 | struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); | 179 | struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); |
| @@ -208,6 +209,7 @@ static int max14577_resume(struct device *dev) | |||
| 208 | 209 | ||
| 209 | return 0; | 210 | return 0; |
| 210 | } | 211 | } |
| 212 | #endif /* CONFIG_PM_SLEEP */ | ||
| 211 | 213 | ||
| 212 | static struct of_device_id max14577_dt_match[] = { | 214 | static struct of_device_id max14577_dt_match[] = { |
| 213 | { .compatible = "maxim,max14577", }, | 215 | { .compatible = "maxim,max14577", }, |
diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c index be88a3bf7b85..5adede0fb04c 100644 --- a/drivers/mfd/max8997.c +++ b/drivers/mfd/max8997.c | |||
| @@ -164,15 +164,15 @@ static struct max8997_platform_data *max8997_i2c_parse_dt_pdata( | |||
| 164 | return pd; | 164 | return pd; |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | static inline int max8997_i2c_get_driver_data(struct i2c_client *i2c, | 167 | static inline unsigned long max8997_i2c_get_driver_data(struct i2c_client *i2c, |
| 168 | const struct i2c_device_id *id) | 168 | const struct i2c_device_id *id) |
| 169 | { | 169 | { |
| 170 | if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { | 170 | if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { |
| 171 | const struct of_device_id *match; | 171 | const struct of_device_id *match; |
| 172 | match = of_match_node(max8997_pmic_dt_match, i2c->dev.of_node); | 172 | match = of_match_node(max8997_pmic_dt_match, i2c->dev.of_node); |
| 173 | return (int)match->data; | 173 | return (unsigned long)match->data; |
| 174 | } | 174 | } |
| 175 | return (int)id->driver_data; | 175 | return id->driver_data; |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | static int max8997_i2c_probe(struct i2c_client *i2c, | 178 | static int max8997_i2c_probe(struct i2c_client *i2c, |
diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c index 612ca404e150..5d5e186b5d8b 100644 --- a/drivers/mfd/max8998.c +++ b/drivers/mfd/max8998.c | |||
| @@ -169,16 +169,16 @@ static struct max8998_platform_data *max8998_i2c_parse_dt_pdata( | |||
| 169 | return pd; | 169 | return pd; |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | static inline int max8998_i2c_get_driver_data(struct i2c_client *i2c, | 172 | static inline unsigned long max8998_i2c_get_driver_data(struct i2c_client *i2c, |
| 173 | const struct i2c_device_id *id) | 173 | const struct i2c_device_id *id) |
| 174 | { | 174 | { |
| 175 | if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { | 175 | if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { |
| 176 | const struct of_device_id *match; | 176 | const struct of_device_id *match; |
| 177 | match = of_match_node(max8998_dt_match, i2c->dev.of_node); | 177 | match = of_match_node(max8998_dt_match, i2c->dev.of_node); |
| 178 | return (int)(long)match->data; | 178 | return (unsigned long)match->data; |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | return (int)id->driver_data; | 181 | return id->driver_data; |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | static int max8998_i2c_probe(struct i2c_client *i2c, | 184 | static int max8998_i2c_probe(struct i2c_client *i2c, |
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index a139798b8065..714e2135210e 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c | |||
| @@ -315,6 +315,7 @@ static int sec_pmic_remove(struct i2c_client *i2c) | |||
| 315 | return 0; | 315 | return 0; |
| 316 | } | 316 | } |
| 317 | 317 | ||
| 318 | #ifdef CONFIG_PM_SLEEP | ||
| 318 | static int sec_pmic_suspend(struct device *dev) | 319 | static int sec_pmic_suspend(struct device *dev) |
| 319 | { | 320 | { |
| 320 | struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); | 321 | struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); |
| @@ -349,6 +350,7 @@ static int sec_pmic_resume(struct device *dev) | |||
| 349 | 350 | ||
| 350 | return 0; | 351 | return 0; |
| 351 | } | 352 | } |
| 353 | #endif /* CONFIG_PM_SLEEP */ | ||
| 352 | 354 | ||
| 353 | static SIMPLE_DEV_PM_OPS(sec_pmic_pm_ops, sec_pmic_suspend, sec_pmic_resume); | 355 | static SIMPLE_DEV_PM_OPS(sec_pmic_pm_ops, sec_pmic_suspend, sec_pmic_resume); |
| 354 | 356 | ||
diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c index 966cf65c5c36..3cc4c7084b92 100644 --- a/drivers/mfd/tps65217.c +++ b/drivers/mfd/tps65217.c | |||
| @@ -158,7 +158,7 @@ static int tps65217_probe(struct i2c_client *client, | |||
| 158 | { | 158 | { |
| 159 | struct tps65217 *tps; | 159 | struct tps65217 *tps; |
| 160 | unsigned int version; | 160 | unsigned int version; |
| 161 | unsigned int chip_id = ids->driver_data; | 161 | unsigned long chip_id = ids->driver_data; |
| 162 | const struct of_device_id *match; | 162 | const struct of_device_id *match; |
| 163 | bool status_off = false; | 163 | bool status_off = false; |
| 164 | int ret; | 164 | int ret; |
| @@ -170,7 +170,7 @@ static int tps65217_probe(struct i2c_client *client, | |||
| 170 | "Failed to find matching dt id\n"); | 170 | "Failed to find matching dt id\n"); |
| 171 | return -EINVAL; | 171 | return -EINVAL; |
| 172 | } | 172 | } |
| 173 | chip_id = (unsigned int)(unsigned long)match->data; | 173 | chip_id = (unsigned long)match->data; |
| 174 | status_off = of_property_read_bool(client->dev.of_node, | 174 | status_off = of_property_read_bool(client->dev.of_node, |
| 175 | "ti,pmic-shutdown-controller"); | 175 | "ti,pmic-shutdown-controller"); |
| 176 | } | 176 | } |
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index ba04f1bc70eb..e6fab94e2c8a 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c | |||
| @@ -636,7 +636,7 @@ static int wm8994_i2c_probe(struct i2c_client *i2c, | |||
| 636 | if (i2c->dev.of_node) { | 636 | if (i2c->dev.of_node) { |
| 637 | of_id = of_match_device(wm8994_of_match, &i2c->dev); | 637 | of_id = of_match_device(wm8994_of_match, &i2c->dev); |
| 638 | if (of_id) | 638 | if (of_id) |
| 639 | wm8994->type = (int)of_id->data; | 639 | wm8994->type = (enum wm8994_type)of_id->data; |
| 640 | } else { | 640 | } else { |
| 641 | wm8994->type = id->driver_data; | 641 | wm8994->type = id->driver_data; |
| 642 | } | 642 | } |
