浏览代码

mfd: Pass driver_data onto child devices

The MFD cell structure provides a driver_data field but doesn't pass it
on to the child devices when instantiating them - do that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Mark Brown 17 年之前
父节点
当前提交
44faac3155
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/mfd/mfd-core.c

+ 1 - 0
drivers/mfd/mfd-core.c

@@ -34,6 +34,7 @@ static int mfd_add_device(struct device *parent, int id,
 		goto fail_device;
 		goto fail_device;
 
 
 	pdev->dev.parent = parent;
 	pdev->dev.parent = parent;
+	platform_set_drvdata(pdev, cell->driver_data);
 
 
 	ret = platform_device_add_data(pdev,
 	ret = platform_device_add_data(pdev,
 			cell->platform_data, cell->data_size);
 			cell->platform_data, cell->data_size);