aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2009-10-13 18:12:35 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2009-12-13 13:21:18 -0500
commitbbb2e496f72d34a2e8f839456b1e324455b35123 (patch)
tree7b3660150c6b9ceead3a3db0b050ba5a332d2942 /drivers/mfd
parent68d641efd86d901d000b888eeab5481257d49f12 (diff)
mfd: Use platform_device_add_data to set pcf50633 regulator platform data
Platform devices allocated with platform_device_alloc should use platform_device_add_data to set the platform data, because kfree will be called on the platform_data when the device is released. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/pcf50633-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index 69cdbdcd2e82..1774f60b1b2a 100644
--- a/drivers/mfd/pcf50633-core.c
+++ b/drivers/mfd/pcf50633-core.c
@@ -611,7 +611,8 @@ static int __devinit pcf50633_probe(struct i2c_client *client,
611 } 611 }
612 612
613 pdev->dev.parent = pcf->dev; 613 pdev->dev.parent = pcf->dev;
614 pdev->dev.platform_data = &pdata->reg_init_data[i]; 614 platform_device_add_data(pdev, &pdata->reg_init_data[i],
615 sizeof(pdata->reg_init_data[i]));
615 dev_set_drvdata(&pdev->dev, pcf); 616 dev_set_drvdata(&pdev->dev, pcf);
616 pcf->regulator_pdev[i] = pdev; 617 pcf->regulator_pdev[i] = pdev;
617 618