Commit aeb1404d authored by Dong Aisheng's avatar Dong Aisheng Committed by Mark Brown

regulator: anatop: remove unneeded name field of struct anatop_regulator

sreg->name is only used as an intermediate assign of rdesc->name, plus
another strcmp. Since we already have rdesc->name, no need it anymore.
Signed-off-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5062e047
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#define LDO_FET_FULL_ON 0x1f #define LDO_FET_FULL_ON 0x1f
struct anatop_regulator { struct anatop_regulator {
const char *name;
u32 control_reg; u32 control_reg;
struct regmap *anatop; struct regmap *anatop;
int vol_bit_shift; int vol_bit_shift;
...@@ -194,12 +193,12 @@ static int anatop_regulator_probe(struct platform_device *pdev) ...@@ -194,12 +193,12 @@ static int anatop_regulator_probe(struct platform_device *pdev)
if (!sreg) if (!sreg)
return -ENOMEM; return -ENOMEM;
of_property_read_string(np, "regulator-name", &sreg->name);
rdesc = &sreg->rdesc; rdesc = &sreg->rdesc;
rdesc->name = sreg->name;
rdesc->type = REGULATOR_VOLTAGE; rdesc->type = REGULATOR_VOLTAGE;
rdesc->owner = THIS_MODULE; rdesc->owner = THIS_MODULE;
of_property_read_string(np, "regulator-name", &rdesc->name);
initdata = of_get_regulator_init_data(dev, np, rdesc); initdata = of_get_regulator_init_data(dev, np, rdesc);
if (!initdata) if (!initdata)
return -ENOMEM; return -ENOMEM;
...@@ -297,7 +296,7 @@ static int anatop_regulator_probe(struct platform_device *pdev) ...@@ -297,7 +296,7 @@ static int anatop_regulator_probe(struct platform_device *pdev)
* a sane default until imx6-cpufreq was probed and changes the * a sane default until imx6-cpufreq was probed and changes the
* voltage to the correct value. In this case we set 1.25V. * voltage to the correct value. In this case we set 1.25V.
*/ */
if (!sreg->sel && !strcmp(sreg->name, "vddpu")) if (!sreg->sel && !strcmp(rdesc->name, "vddpu"))
sreg->sel = 22; sreg->sel = 22;
if (!sreg->bypass && !sreg->sel) { if (!sreg->bypass && !sreg->sel) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment