1
0
Fork 0

One simple fix to repair broken regulator probe() in DA9052

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVZbn0AAoJEFGvii+H/Hdhn3QP/39towL04syHy1GoGvx7Poff
 wvb1ikzXSkHrH/bEA2P0FNn1sMZk6UT6yDwXAXRi5qxlvqQFyGrIi/FSnDwRWJF+
 Z+vfzbpJxntJZN/nGmaRMpxZhgRsSwTUJv6dmyCDHUEKzQi94eNSKrGvnDGF2tw2
 I42BIULp9DIAzluz2qYZygcpwhymRRHUXXxiQpmM7ije2on5FI11WecVk1OhxAFq
 uonAGJXCEhDEVZAmzuJUCn2OTVl3a3h1K/xi6DInohbI7WA3yrpMP7QYHI27hF5x
 IckN9lFskYnGGv+XufDDxqbTDZkDpM0pDCqGrxNoNKUhVRKhlyDGf5SQOfASx/Cm
 0QpqgImmuDL4zNhT7LOX6KHF5UpwDhcGzQMGq3o8mFeGRFW39Lucn11LR148lAVv
 hFD1Tmm7BuTObq2qr40UbDyrhLaW4kWLj/Xd3WkGqUZT3R552PAjfPCHeukWff61
 x5UQhbx/Vr9G254NWwKKdC6T6I/4hj1DULT9W+DE7pl/sS7ge8DyPed5x5MmHa7i
 91wmcwjI0aRYepobsPMMz5lWbWrSZWWRw0RIUAk2g4KbX5W6Tiw1Jk5bwmjN/C9x
 JiaHhyI5p+qOmv+jtj9R8jmxlu2ToL8WWKXSL7zM+dDZurJpY/V3x2NHa4Aqatc8
 tRZy0blJgKPK4F4d6xVq
 =uTeE
 -----END PGP SIGNATURE-----

Merge tag 'mfd-fixes-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull an MFD fix from Lee Jones:
 "One simple fix to repair broken regulator probe() in DA9052"

* tag 'mfd-fixes-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
  mfd: da9052: Fix broken regulator probe
wifi-calibration
Linus Torvalds 2015-05-27 09:06:59 -07:00
commit 1b887bf31d
2 changed files with 7 additions and 6 deletions

View File

@ -431,6 +431,10 @@ int da9052_adc_read_temp(struct da9052 *da9052)
EXPORT_SYMBOL_GPL(da9052_adc_read_temp);
static const struct mfd_cell da9052_subdev_info[] = {
{
.name = "da9052-regulator",
.id = 0,
},
{
.name = "da9052-regulator",
.id = 1,
@ -483,10 +487,6 @@ static const struct mfd_cell da9052_subdev_info[] = {
.name = "da9052-regulator",
.id = 13,
},
{
.name = "da9052-regulator",
.id = 14,
},
{
.name = "da9052-onkey",
},

View File

@ -394,6 +394,7 @@ static inline struct da9052_regulator_info *find_regulator_info(u8 chip_id,
static int da9052_regulator_probe(struct platform_device *pdev)
{
const struct mfd_cell *cell = mfd_get_cell(pdev);
struct regulator_config config = { };
struct da9052_regulator *regulator;
struct da9052 *da9052;
@ -409,7 +410,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
regulator->da9052 = da9052;
regulator->info = find_regulator_info(regulator->da9052->chip_id,
pdev->id);
cell->id);
if (regulator->info == NULL) {
dev_err(&pdev->dev, "invalid regulator ID specified\n");
return -EINVAL;
@ -419,7 +420,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
config.driver_data = regulator;
config.regmap = da9052->regmap;
if (pdata && pdata->regulators) {
config.init_data = pdata->regulators[pdev->id];
config.init_data = pdata->regulators[cell->id];
} else {
#ifdef CONFIG_OF
struct device_node *nproot = da9052->dev->of_node;