summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/mfd-core.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-04-06 16:52:52 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-05-26 19:44:56 +0200
commiteb8956074e7652e802be5f078080c704c2c87104 (patch)
treeb96a4eaaf69e36a6a88282fa9572e194c5f5a1ba /drivers/mfd/mfd-core.c
parent4db70f73e56961b9bcdfd0c36c62847a18b7dbb5 (diff)
downloadlinux-stable-eb8956074e7652e802be5f078080c704c2c87104.tar.gz
linux-stable-eb8956074e7652e802be5f078080c704c2c87104.tar.bz2
linux-stable-eb8956074e7652e802be5f078080c704c2c87104.zip
mfd: Add platform data pointer back
Now that we have a way to pass MFD cells down to the sub drivers, we can gradually get rid of mfd_data by putting the platform pointer back in place. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/mfd-core.c')
-rw-r--r--drivers/mfd/mfd-core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index f4c8c844b913..0902523af62d 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -88,6 +88,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;