diff options
author | Jin Park <jinyoungp@nvidia.com> | 2011-10-24 16:44:42 +0900 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 01:09:27 -0700 |
commit | dedbf21a45a9fe43d5a30c15619fe7602f149d13 (patch) | |
tree | 621bfa436228cef4b0b4083f562d689a36d4cfcf /drivers/regulator/max77663-regulator.c | |
parent | a915cf8972ddae79ae35239d63e8d0f120dc973f (diff) |
mfd: max77663: Update the driver to new mfd core
The mfd core was updated that removed size_t data_size and
renamed void *platform_data to void *mfd_data in struct mfd_cell.
The new mfd API, mfd_get_data(), was added for mfd device.
It return from struct platform_device to right value of mfd_data
and platform_data.
Change-Id: I21528879f2186d568f867f1c7e026f8d8e172b5a
Signed-off-by: Jin Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/59891
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R4ee12a3ba5afec4255002e226f479e1c96a0f66c
Diffstat (limited to 'drivers/regulator/max77663-regulator.c')
-rw-r--r-- | drivers/regulator/max77663-regulator.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/regulator/max77663-regulator.c b/drivers/regulator/max77663-regulator.c index acc55dde39f7..76266e3ec9f3 100644 --- a/drivers/regulator/max77663-regulator.c +++ b/drivers/regulator/max77663-regulator.c @@ -21,6 +21,7 @@ #include <linux/debugfs.h> #include <linux/uaccess.h> #include <linux/i2c.h> +#include <linux/mfd/core.h> #include <linux/mfd/max77663-core.h> #include <linux/regulator/driver.h> #include <linux/regulator/machine.h> @@ -142,6 +143,7 @@ struct max77663_register { struct max77663_regulator { struct regulator_dev *rdev; struct device *dev; + struct max77663_regulator_platform_data *pdata; u8 id; u8 type; @@ -181,7 +183,7 @@ static struct max77663_register fps_cfg_regs[] = { static inline struct max77663_regulator_platform_data *_to_pdata(struct max77663_regulator *reg) { - return reg->dev->platform_data; + return reg->pdata; } static inline struct device *_to_parent(struct max77663_regulator *reg) @@ -759,7 +761,6 @@ static int max77663_regulator_probe(struct platform_device *pdev) { struct regulator_desc *rdesc; struct max77663_regulator *reg; - struct max77663_regulator_platform_data *pdata; int ret = 0; if ((pdev->id < 0) || (pdev->id >= MAX77663_REGULATOR_ID_NR)) { @@ -770,7 +771,7 @@ static int max77663_regulator_probe(struct platform_device *pdev) rdesc = &max77663_rdesc[pdev->id]; reg = &max77663_regs[pdev->id]; reg->dev = &pdev->dev; - pdata = reg->dev->platform_data; + reg->pdata = mfd_get_data(pdev); dev_dbg(&pdev->dev, "probe: name=%s\n", rdesc->name); @@ -781,8 +782,8 @@ static int max77663_regulator_probe(struct platform_device *pdev) return ret; } - reg->rdev = regulator_register(rdesc, &pdev->dev, &pdata->init_data, - reg, NULL); + reg->rdev = regulator_register(rdesc, &pdev->dev, + ®->pdata->init_data, reg, NULL); if (IS_ERR(reg->rdev)) { dev_err(&pdev->dev, "probe: Failed to register regulator %s\n", rdesc->name); |