未验证 提交 c1472737 编写于 作者: P Paweł Chmiel 提交者: Mark Brown

regulator: max8998: Fix platform data retrieval.

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: ee999fb3 ("mfd: max8998: Add support for Device Tree")
Signed-off-by: NPaweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 d2a66ddf
...@@ -309,8 +309,7 @@ static int max8998_set_voltage_buck_sel(struct regulator_dev *rdev, ...@@ -309,8 +309,7 @@ static int max8998_set_voltage_buck_sel(struct regulator_dev *rdev,
unsigned selector) unsigned selector)
{ {
struct max8998_data *max8998 = rdev_get_drvdata(rdev); struct max8998_data *max8998 = rdev_get_drvdata(rdev);
struct max8998_platform_data *pdata = struct max8998_platform_data *pdata = max8998->iodev->pdata;
dev_get_platdata(max8998->iodev->dev);
struct i2c_client *i2c = max8998->iodev->i2c; struct i2c_client *i2c = max8998->iodev->i2c;
int buck = rdev_get_id(rdev); int buck = rdev_get_id(rdev);
int reg, shift = 0, mask, ret, j; int reg, shift = 0, mask, ret, j;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册