If max77686 mfd driver gets the initial data from device tree,
dev->plat_data might be NULL. So, when sub devices want to get
parent platform data, it can get only NULL pointer even parent
mfd driver probed completely. So we need to re-initialize
dev->plat_data at end of parsing device tree.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
int ret = 0;
if (i2c->dev.of_node)
- pdata = max77686_i2c_parse_dt_pdata(&i2c->dev);
+ pdata = i2c->dev.platform_data =
+ max77686_i2c_parse_dt_pdata(&i2c->dev);
if (!pdata) {
ret = -EIO;