Message ID | 1410722585-13393-3-git-send-email-heiko@sntech.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sun, Sep 14, 2014 at 09:23:02PM +0200, Heiko Stuebner wrote: > There is a high potential of more than one of those regulators existing > on a board, so name the regulator according to the name provided in the > initdata instead of statically. No, this is pointless and broken. The core will already use the board-specific name to identify the regulator in diagnostics and so on, the name being supplied here is supposed to describe the regulator within the device.
Am Montag, 15. September 2014, 09:59:23 schrieb Mark Brown: > On Sun, Sep 14, 2014 at 09:23:02PM +0200, Heiko Stuebner wrote: > > There is a high potential of more than one of those regulators existing > > on a board, so name the regulator according to the name provided in the > > initdata instead of statically. > > No, this is pointless and broken. The core will already use the > board-specific name to identify the regulator in diagnostics and so on, > the name being supplied here is supposed to describe the regulator > within the device. ok, sorry for the mess-up I've just tested, patches 3-5 apply and work correctly without this one, so do you want to apply them like this or a resend of last 3? Heiko
On Tue, Sep 16, 2014 at 12:08:12AM +0200, Heiko Stübner wrote: > I've just tested, patches 3-5 apply and work correctly without this one, so do > you want to apply them like this or a resend of last 3? No, please implement the changes I asked for in the DT stuff.
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index c912ba7..d143790 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -206,7 +206,12 @@ static int fan53555_regulator_register(struct fan53555_device_info *di, { struct regulator_desc *rdesc = &di->desc; - rdesc->name = "fan53555-reg"; + rdesc->name = devm_kstrdup(di->dev, + di->regulator->constraints.name, + GFP_KERNEL); + if (!rdesc->name) + return -ENOMEM; + rdesc->supply_name = "vin"; rdesc->ops = &fan53555_regulator_ops; rdesc->type = REGULATOR_VOLTAGE;
There is a high potential of more than one of those regulators existing on a board, so name the regulator according to the name provided in the initdata instead of statically. Signed-off-by: Heiko Stuebner <heiko@sntech.de> --- drivers/regulator/fan53555.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)