linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
To: Rob Herring <robherring2@gmail.com>
Cc: Frank Rowand <frowand.list@gmail.com>,
	Matt Porter <mporter@konsulko.com>,
	Koen Kooi <koen@dominion.thruhere.net>,
	Guenter Roeck <linux@roeck-us.net>, Marek Vasut <marex@denx.de>,
	Wolfram Sang <wsa@the-dreams.de>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-i2c@vger.kernel.org,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	Pantelis Antoniou <panto@antoniou-consulting.com>
Subject: [PATCH v2 5/5] i2c: demux: Use changeset helpers for clarity
Date: Mon, 16 May 2016 19:41:28 +0300	[thread overview]
Message-ID: <1463416888-22044-6-git-send-email-pantelis.antoniou@konsulko.com> (raw)
In-Reply-To: <1463416888-22044-1-git-send-email-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>
---
 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

  parent reply	other threads:[~2016-05-16 16:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-16 16:41 [PATCH v2 0/5] of: dynamic: Changesets helpers & fixes Pantelis Antoniou
2016-05-16 16:41 ` [PATCH v2 1/5] of: dynamic: Add __of_node_dupv() Pantelis Antoniou
2016-05-16 16:41 ` [PATCH v2 2/5] of: changesets: Introduce changeset helper methods Pantelis Antoniou
2016-05-17 10:25   ` Peter Rosin
2016-05-16 16:41 ` [PATCH v2 3/5] of: changeset: Add of_changeset_node_move method Pantelis Antoniou
2016-05-16 16:41 ` [PATCH v2 4/5] of: unittest: changeset helpers Pantelis Antoniou
2016-05-16 16:41 ` Pantelis Antoniou [this message]
2016-05-26 18:58   ` [PATCH v2 5/5] i2c: demux: Use changeset helpers for clarity Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463416888-22044-6-git-send-email-pantelis.antoniou@konsulko.com \
    --to=pantelis.antoniou@konsulko.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=koen@dominion.thruhere.net \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=marex@denx.de \
    --cc=mporter@konsulko.com \
    --cc=panto@antoniou-consulting.com \
    --cc=robherring2@gmail.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).