Commit 51f83ef0c94e26f85a8a985035a991fcafbcce15

Authored by Linus Torvalds

Merge tag 'regulator-v3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "More changes than I'd like here, most of them for a single bug
  repeated in a bunch of drivers with data not being initialized
  correctly, plus a fix to lower the severity of a warning introduced in
  the last merge window which can legitimately go off so we don't want
  to alarm users excessively"

* tag 'regulator-v3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: s2mpa01: zero-initialize regulator match table array
  regulator: max8660: zero-initialize regulator match table array
  regulator: max77802: zero-initialize regulator match table
  regulator: max77686: zero-initialize regulator match table
  regulator: max1586: zero-initialize regulator match table array
  regulator: max77693: Fix use of uninitialized regulator config
  regulator: of: Lower the severity of the error with no container

Showing 7 changed files Side-by-side Diff

drivers/regulator/max1586.c
... ... @@ -163,7 +163,7 @@
163 163 struct max1586_platform_data *pdata)
164 164 {
165 165 struct max1586_subdev_data *sub;
166   - struct of_regulator_match rmatch[ARRAY_SIZE(max1586_reg)];
  166 + struct of_regulator_match rmatch[ARRAY_SIZE(max1586_reg)] = { };
167 167 struct device_node *np = dev->of_node;
168 168 int i, matched;
169 169  
drivers/regulator/max77686.c
... ... @@ -395,7 +395,7 @@
395 395 struct max77686_dev *iodev = dev_get_drvdata(pdev->dev.parent);
396 396 struct device_node *pmic_np, *regulators_np;
397 397 struct max77686_regulator_data *rdata;
398   - struct of_regulator_match rmatch;
  398 + struct of_regulator_match rmatch = { };
399 399 unsigned int i;
400 400  
401 401 pmic_np = iodev->dev->of_node;
drivers/regulator/max77693.c
... ... @@ -227,7 +227,7 @@
227 227 struct max77693_dev *iodev = dev_get_drvdata(pdev->dev.parent);
228 228 struct max77693_regulator_data *rdata = NULL;
229 229 int num_rdata, i;
230   - struct regulator_config config;
  230 + struct regulator_config config = { };
231 231  
232 232 num_rdata = max77693_pmic_init_rdata(&pdev->dev, &rdata);
233 233 if (!rdata || num_rdata <= 0) {
drivers/regulator/max77802.c
... ... @@ -454,7 +454,7 @@
454 454 struct max77686_dev *iodev = dev_get_drvdata(pdev->dev.parent);
455 455 struct device_node *pmic_np, *regulators_np;
456 456 struct max77686_regulator_data *rdata;
457   - struct of_regulator_match rmatch;
  457 + struct of_regulator_match rmatch = { };
458 458 unsigned int i;
459 459  
460 460 pmic_np = iodev->dev->of_node;
drivers/regulator/max8660.c
... ... @@ -335,7 +335,7 @@
335 335 int matched, i;
336 336 struct device_node *np;
337 337 struct max8660_subdev_data *sub;
338   - struct of_regulator_match rmatch[ARRAY_SIZE(max8660_reg)];
  338 + struct of_regulator_match rmatch[ARRAY_SIZE(max8660_reg)] = { };
339 339  
340 340 np = of_get_child_by_name(dev->of_node, "regulators");
341 341 if (!np) {
drivers/regulator/of_regulator.c
... ... @@ -211,7 +211,8 @@
211 211 search = dev->of_node;
212 212  
213 213 if (!search) {
214   - dev_err(dev, "Failed to find regulator container node\n");
  214 + dev_dbg(dev, "Failed to find regulator container node '%s'\n",
  215 + desc->regulators_node);
215 216 return NULL;
216 217 }
217 218  
drivers/regulator/s2mpa01.c
... ... @@ -341,7 +341,7 @@
341 341 {
342 342 struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
343 343 struct sec_platform_data *pdata = dev_get_platdata(iodev->dev);
344   - struct of_regulator_match rdata[S2MPA01_REGULATOR_MAX];
  344 + struct of_regulator_match rdata[S2MPA01_REGULATOR_MAX] = { };
345 345 struct device_node *reg_np = NULL;
346 346 struct regulator_config config = { };
347 347 struct s2mpa01_info *s2mpa01;