Message ID | 20180222000531.19448-7-laurent.pinchart+renesas@ideasonboard.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Hi Laurent, On Thu, Feb 22, 2018 at 1:05 AM, Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> wrote: > From: Pantelis Antoniou <pantelis.antoniou@konsulko.com> > > The changeset helpers are easier to use, use them instead of > using the static property. > > Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> > Acked-by: Wolfram Sang <wsa@the-dreams.de> > ["okay" -> "ok"] Why? ePAPR says "okay", "disabled", "fail", or "fail-sss". Sorry for missing this in the previous round. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, On Thursday, 22 February 2018 11:26:44 EET Geert Uytterhoeven wrote: > On Thu, Feb 22, 2018 at 1:05 AM, Laurent Pinchart wrote: > > From: Pantelis Antoniou <pantelis.antoniou@konsulko.com> > > > > The changeset helpers are easier to use, use them instead of > > using the static property. > > > > Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> > > Acked-by: Wolfram Sang <wsa@the-dreams.de> > > ["okay" -> "ok"] > > Why? ePAPR says "okay", "disabled", "fail", or "fail-sss". > > Sorry for missing this in the previous round. That was per Wolfram's request, and because the existing code uses "ok". I'm personally fine with any.
> > Why? ePAPR says "okay", "disabled", "fail", or "fail-sss". > > > > Sorry for missing this in the previous round. > > That was per Wolfram's request, and because the existing code uses "ok". I'm > personally fine with any. I did? Well, today I don't have a strong preference. Any is fine with me, too.
diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/i2c-demux-pinctrl.c index 33ce032cb701..0f0046831492 100644 --- a/drivers/i2c/muxes/i2c-demux-pinctrl.c +++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c @@ -220,10 +220,7 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev) priv = devm_kzalloc(&pdev->dev, sizeof(*priv) + num_chan * sizeof(struct i2c_demux_pinctrl_chan), GFP_KERNEL); - - props = devm_kcalloc(&pdev->dev, num_chan, sizeof(*props), GFP_KERNEL); - - if (!priv || !props) + if (!priv) return -ENOMEM; err = of_property_read_string(np, "i2c-bus-name", &priv->bus_name); @@ -241,12 +238,9 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev) } priv->chan[i].parent_np = adap_np; - props[i].name = devm_kstrdup(&pdev->dev, "status", GFP_KERNEL); - props[i].value = devm_kstrdup(&pdev->dev, "ok", GFP_KERNEL); - props[i].length = 3; - of_changeset_init(&priv->chan[i].chgset); - of_changeset_update_property(&priv->chan[i].chgset, adap_np, &props[i]); + of_changeset_update_property_string(&priv->chan[i].chgset, + adap_np, "status", "ok"); } priv->num_chan = num_chan;