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

regulator: cpcap: Remove unneeded init_data setting

This driver is using regulator core's simplified DT parsing code,
so regulator will call regulator_of_get_init_data() to get init_data.
No need to set config.init_data. In additional, current code does not
properly set the init_data setting, so just remove it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Axel Lin and committed by
Mark Brown
2106e9bb 4d92ac7b

-3
-3
drivers/regulator/cpcap-regulator.c
··· 507 507 struct cpcap_ddata *ddata; 508 508 const struct of_device_id *match; 509 509 struct regulator_config config; 510 - struct regulator_init_data init_data; 511 510 int i; 512 511 513 512 match = of_match_device(of_match_ptr(cpcap_regulator_id_table), ··· 533 534 platform_set_drvdata(pdev, ddata); 534 535 535 536 memset(&config, 0, sizeof(config)); 536 - memset(&init_data, 0, sizeof(init_data)); 537 537 config.dev = &pdev->dev; 538 538 config.regmap = ddata->reg; 539 - config.init_data = &init_data; 540 539 541 540 for (i = 0; i < CPCAP_NR_REGULATORS; i++) { 542 541 const struct cpcap_regulator *regulator = &ddata->soc[i];