summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/bd718x7-regulator.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2018-10-28 17:09:22 +0100
committerMark Brown <broonie@kernel.org>2018-11-07 15:27:39 +0100
commitde226ebda96cafa981b9c0fef56888931668b671 (patch)
tree6d8597b04a3072098bca91f0f9846c9f230f0b45 /drivers/regulator/bd718x7-regulator.c
parentregulator: pfuze100-regulator: add coin support to PF0100 (diff)
downloadlinux-de226ebda96cafa981b9c0fef56888931668b671.tar.xz
linux-de226ebda96cafa981b9c0fef56888931668b671.zip
regulator: bd718x7: Remove double indirection for bd718xx_pmic_inits.rdatas
With gcc 4.1: drivers/regulator/bd718x7-regulator.c: In function ‘bd718xx_probe’: drivers/regulator/bd718x7-regulator.c:1020: warning: initialization from incompatible pointer type drivers/regulator/bd718x7-regulator.c:1024: warning: initialization from incompatible pointer type Apparently this old compiler can't handle the obscure double indirection. However, there is no need for a double indirection. Just store a pointer to the array instead, like other drivers tend to do. Fixes: 494edd266b945f36 ("regulator/mfd: Support ROHM BD71847 power management IC") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/bd718x7-regulator.c')
-rw-r--r--drivers/regulator/bd718x7-regulator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/regulator/bd718x7-regulator.c b/drivers/regulator/bd718x7-regulator.c
index 3a47e0372e77..fff5bc4faa2c 100644
--- a/drivers/regulator/bd718x7-regulator.c
+++ b/drivers/regulator/bd718x7-regulator.c
@@ -1007,7 +1007,7 @@ static const struct bd718xx_regulator_data bd71837_regulators[] = {
};
struct bd718xx_pmic_inits {
- const struct bd718xx_regulator_data (*r_datas)[];
+ const struct bd718xx_regulator_data *r_datas;
unsigned int r_amount;
};
@@ -1017,11 +1017,11 @@ static int bd718xx_probe(struct platform_device *pdev)
struct regulator_config config = { 0 };
struct bd718xx_pmic_inits pmic_regulators[] = {
[BD718XX_TYPE_BD71837] = {
- .r_datas = &bd71837_regulators,
+ .r_datas = bd71837_regulators,
.r_amount = ARRAY_SIZE(bd71837_regulators),
},
[BD718XX_TYPE_BD71847] = {
- .r_datas = &bd71847_regulators,
+ .r_datas = bd71847_regulators,
.r_amount = ARRAY_SIZE(bd71847_regulators),
},
};
@@ -1059,7 +1059,7 @@ static int bd718xx_probe(struct platform_device *pdev)
struct regulator_dev *rdev;
const struct bd718xx_regulator_data *r;
- r = &(*pmic_regulators[mfd->chip_type].r_datas)[i];
+ r = &pmic_regulators[mfd->chip_type].r_datas[i];
desc = &r->desc;
config.dev = pdev->dev.parent;