summaryrefslogtreecommitdiff
path: root/drivers/regulator/max8998.c
diff options
context:
space:
mode:
authorPaweł Chmiel <pawel.mikolaj.chmiel@gmail.com>2018-04-27 19:02:59 +0300
committerBen Hutchings <ben@decadent.org.uk>2018-11-20 21:04:56 +0300
commit002714448aa33aa9c38f647b3d44e265909ccf39 (patch)
tree837374b5defb0bda5ad3801898918f531038f426 /drivers/regulator/max8998.c
parent1e5d8ddd278e8b884c5b57a4512ee68457d2c50e (diff)
downloadlinux-002714448aa33aa9c38f647b3d44e265909ccf39.tar.xz
regulator: max8998: Fix platform data retrieval.
commit c1472737914fe5246a672fef6e85c9455de8473f upstream. Since the max8998 MFD driver supports instantiation by DT, platform data retrieval is handled in MFD probe and cell drivers should get use the pdata field of max8998_dev struct to obtain them. Fixes: ee999fb3f17f ("mfd: max8998: Add support for Device Tree") Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/regulator/max8998.c')
-rw-r--r--drivers/regulator/max8998.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c
index 961091b46557..8f05b9b42870 100644
--- a/drivers/regulator/max8998.c
+++ b/drivers/regulator/max8998.c
@@ -309,8 +309,7 @@ static int max8998_set_voltage_buck_sel(struct regulator_dev *rdev,
unsigned selector)
{
struct max8998_data *max8998 = rdev_get_drvdata(rdev);
- struct max8998_platform_data *pdata =
- dev_get_platdata(max8998->iodev->dev);
+ struct max8998_platform_data *pdata = max8998->iodev->pdata;
struct i2c_client *i2c = max8998->iodev->i2c;
int buck = rdev_get_id(rdev);
int reg, shift = 0, mask, ret, j;