Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1401623 > unrolled thread

[PATCH v2 5/5] i2c: demux: Use changeset helpers for clarity

Started byPantelis Antoniou <pantelis.antoniou@konsulko.com>
First post2016-05-16 18:50 +0200
Last post2016-05-26 21:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 5/5] i2c: demux: Use changeset helpers for clarity Pantelis Antoniou <pantelis.antoniou@konsulko.com> - 2016-05-16 18:50 +0200
    Re: [PATCH v2 5/5] i2c: demux: Use changeset helpers for clarity Wolfram Sang <wsa@the-dreams.de> - 2016-05-26 21:00 +0200

#1401623 — [PATCH v2 5/5] i2c: demux: Use changeset helpers for clarity

FromPantelis Antoniou <pantelis.antoniou@konsulko.com>
Date2016-05-16 18:50 +0200
Subject[PATCH v2 5/5] i2c: demux: Use changeset helpers for clarity
Message-ID<rztSq-10v-19@gated-at.bofh.it>
The changeset helpers are easier to use, use them instead of
using the static property.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
---
 drivers/i2c/muxes/i2c-demux-pinctrl.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/i2c-demux-pinctrl.c
index 8de073a..ddaca9e 100644
--- a/drivers/i2c/muxes/i2c-demux-pinctrl.c
+++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c
@@ -37,8 +37,6 @@ struct i2c_demux_pinctrl_priv {
 	struct i2c_demux_pinctrl_chan chan[];
 };
 
-static struct property status_okay = { .name = "status", .length = 3, .value = "ok" };
-
 static int i2c_demux_master_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 {
 	struct i2c_demux_pinctrl_priv *priv = adap->algo_data;
@@ -219,7 +217,8 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev)
 		priv->chan[i].parent_np = adap_np;
 
 		of_changeset_init(&priv->chan[i].chgset);
-		of_changeset_update_property(&priv->chan[i].chgset, adap_np, &status_okay);
+		of_changeset_update_property_string(&priv->chan[i].chgset,
+				adap_np, "status", "okay");
 	}
 
 	priv->num_chan = num_chan;
-- 
1.7.12

[toc] | [next] | [standalone]


#1407677

FromWolfram Sang <wsa@the-dreams.de>
Date2016-05-26 21:00 +0200
Message-ID<rD8FI-1wa-47@gated-at.bofh.it>
In reply to#1401623

[Multipart message — attachments visible in raw view] — view raw

On Mon, May 16, 2016 at 07:41:28PM +0300, Pantelis Antoniou wrote:
> The changeset helpers are easier to use, use them instead of
> using the static property.
> 
> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>

If you think this is worthwhile, then it's fine with me :)

Acked-by: Wolfram Sang <wsa@the-dreams.de>

> +				adap_np, "status", "okay");

"ok" would be shorter?

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web