Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: max77686: initialize of_node param for regulator register

Initialize config.of_node for regulator before registering.
This is needed for DT based regulator support.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by

Axel Lin and committed by
Mark Brown
2c58e266 7fee2afb

+3
+2
drivers/regulator/max77686.c
··· 265 265 rmatch.of_node = NULL; 266 266 of_regulator_match(iodev->dev, regulators_np, &rmatch, 1); 267 267 rdata[i].initdata = rmatch.init_data; 268 + rdata[i].of_node = rmatch.of_node; 268 269 } 269 270 270 271 pdata->regulators = rdata; ··· 326 325 327 326 for (i = 0; i < MAX77686_REGULATORS; i++) { 328 327 config.init_data = pdata->regulators[i].initdata; 328 + config.of_node = pdata->regulators[i].of_node; 329 329 330 330 rdev[i] = regulator_register(&regulators[i], &config); 331 331 if (IS_ERR(rdev[i])) {
+1
include/linux/mfd/max77686.h
··· 74 74 struct max77686_regulator_data { 75 75 int id; 76 76 struct regulator_init_data *initdata; 77 + struct device_node *of_node; 77 78 }; 78 79 79 80 enum max77686_opmode {