]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/mfd/mfd-core.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
[karo-tx-linux.git] / drivers / mfd / mfd-core.c
index f4c8c844b913060c6e0bb12f35db8cba983a81dc..0f5922812bffdee8e3e892cab978052548d92114 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/mfd/core.h>
 #include <linux/pm_runtime.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 int mfd_cell_enable(struct platform_device *pdev)
 {
@@ -88,6 +89,13 @@ static int mfd_add_device(struct device *parent, int id,
 
        pdev->dev.parent = parent;
 
+       if (cell->pdata_size) {
+               ret = platform_device_add_data(pdev,
+                                       cell->platform_data, cell->pdata_size);
+               if (ret)
+                       goto fail_res;
+       }
+
        ret = mfd_platform_add_cell(pdev, cell);
        if (ret)
                goto fail_res;