diff options
Diffstat (limited to 'drivers/mfd/sec-core.c')
-rw-r--r-- | drivers/mfd/sec-core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index d4682c6cbff5..09fd256abcf6 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c | |||
@@ -251,6 +251,7 @@ static int sec_pmic_probe(struct i2c_client *i2c, | |||
251 | struct sec_platform_data *pdata = dev_get_platdata(&i2c->dev); | 251 | struct sec_platform_data *pdata = dev_get_platdata(&i2c->dev); |
252 | const struct regmap_config *regmap; | 252 | const struct regmap_config *regmap; |
253 | struct sec_pmic_dev *sec_pmic; | 253 | struct sec_pmic_dev *sec_pmic; |
254 | unsigned long device_type; | ||
254 | int ret; | 255 | int ret; |
255 | 256 | ||
256 | sec_pmic = devm_kzalloc(&i2c->dev, sizeof(struct sec_pmic_dev), | 257 | sec_pmic = devm_kzalloc(&i2c->dev, sizeof(struct sec_pmic_dev), |
@@ -262,7 +263,7 @@ static int sec_pmic_probe(struct i2c_client *i2c, | |||
262 | sec_pmic->dev = &i2c->dev; | 263 | sec_pmic->dev = &i2c->dev; |
263 | sec_pmic->i2c = i2c; | 264 | sec_pmic->i2c = i2c; |
264 | sec_pmic->irq = i2c->irq; | 265 | sec_pmic->irq = i2c->irq; |
265 | sec_pmic->type = sec_i2c_get_driver_data(i2c, id); | 266 | device_type = sec_i2c_get_driver_data(i2c, id); |
266 | 267 | ||
267 | if (sec_pmic->dev->of_node) { | 268 | if (sec_pmic->dev->of_node) { |
268 | pdata = sec_pmic_i2c_parse_dt_pdata(sec_pmic->dev); | 269 | pdata = sec_pmic_i2c_parse_dt_pdata(sec_pmic->dev); |
@@ -270,7 +271,7 @@ static int sec_pmic_probe(struct i2c_client *i2c, | |||
270 | ret = PTR_ERR(pdata); | 271 | ret = PTR_ERR(pdata); |
271 | return ret; | 272 | return ret; |
272 | } | 273 | } |
273 | pdata->device_type = sec_pmic->type; | 274 | pdata->device_type = device_type; |
274 | } | 275 | } |
275 | if (pdata) { | 276 | if (pdata) { |
276 | sec_pmic->device_type = pdata->device_type; | 277 | sec_pmic->device_type = pdata->device_type; |