linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: mux: reg: use of_property_read_bool()
@ 2017-08-20 19:06 Sergei Shtylyov
  2017-10-13 12:13 ` Sergei Shtylyov
  2017-10-20 15:40 ` Peter Rosin
  0 siblings, 2 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2017-08-20 19:06 UTC (permalink / raw)
  To: Peter Rosin, Wolfram Sang, linux-i2c; +Cc: Sergei Shtylyov

[-- Attachment #1: i2c-mux-reg-use-of_property_read_bool.patch --]
[-- Type: text/plain, Size: 1486 bytes --]

Use more compact of_property_read_bool() calls for the boolean properties
instead  of of_find_property() calls  in i2c_mux_reg_probe_dt().

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
The patch is against Wolfram Sang's 'linux.git' repo's 'i2c/for-next' branch.

 drivers/i2c/muxes/i2c-mux-reg.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Index: linux/drivers/i2c/muxes/i2c-mux-reg.c
===================================================================
--- linux.orig/drivers/i2c/muxes/i2c-mux-reg.c
+++ linux/drivers/i2c/muxes/i2c-mux-reg.c
@@ -107,9 +107,9 @@ static int i2c_mux_reg_probe_dt(struct r
 	put_device(&adapter->dev);
 
 	mux->data.n_values = of_get_child_count(np);
-	if (of_find_property(np, "little-endian", NULL)) {
+	if (of_property_read_bool(np, "little-endian")) {
 		mux->data.little_endian = true;
-	} else if (of_find_property(np, "big-endian", NULL)) {
+	} else if (of_property_read_bool(np, "big-endian")) {
 		mux->data.little_endian = false;
 	} else {
 #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : \
@@ -122,10 +122,7 @@ static int i2c_mux_reg_probe_dt(struct r
 #error Endianness not defined?
 #endif
 	}
-	if (of_find_property(np, "write-only", NULL))
-		mux->data.write_only = true;
-	else
-		mux->data.write_only = false;
+	mux->data.write_only = of_property_read_bool(np, "write-only");
 
 	values = devm_kzalloc(&pdev->dev,
 			      sizeof(*mux->data.values) * mux->data.n_values,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: mux: reg: use of_property_read_bool()
  2017-08-20 19:06 [PATCH] i2c: mux: reg: use of_property_read_bool() Sergei Shtylyov
@ 2017-10-13 12:13 ` Sergei Shtylyov
  2017-10-13 21:53   ` Peter Rosin
  2017-10-20 15:40 ` Peter Rosin
  1 sibling, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2017-10-13 12:13 UTC (permalink / raw)
  To: Peter Rosin, Wolfram Sang, linux-i2c

Hello!

On 08/20/2017 10:06 PM, Sergei Shtylyov wrote:

> Use more compact of_property_read_bool() calls for the boolean properties
> instead  of of_find_property() calls  in i2c_mux_reg_probe_dt().
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
[...]

    This patch seems to be lost. Ping?

MBR, Sergei

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: mux: reg: use of_property_read_bool()
  2017-10-13 12:13 ` Sergei Shtylyov
@ 2017-10-13 21:53   ` Peter Rosin
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Rosin @ 2017-10-13 21:53 UTC (permalink / raw)
  To: Sergei Shtylyov, Wolfram Sang, linux-i2c

On 2017-10-13 14:13, Sergei Shtylyov wrote:
> Hello!
> 
> On 08/20/2017 10:06 PM, Sergei Shtylyov wrote:
> 
>> Use more compact of_property_read_bool() calls for the boolean properties
>> instead  of of_find_property() calls  in i2c_mux_reg_probe_dt().
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> [...]
> 
>     This patch seems to be lost. Ping?

The patch arrived too late to hit the previous merge window (I had already
done the pull request). I had admittedly forgotten about this patch, but the
mail sits there with a "TODO" tag, so I think I would have found it when
digging through stuff for this merge window.

Anyway, thanks for the reminder, and sorry for the delay.

Cheers,
Peter

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: mux: reg: use of_property_read_bool()
  2017-08-20 19:06 [PATCH] i2c: mux: reg: use of_property_read_bool() Sergei Shtylyov
  2017-10-13 12:13 ` Sergei Shtylyov
@ 2017-10-20 15:40 ` Peter Rosin
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Rosin @ 2017-10-20 15:40 UTC (permalink / raw)
  To: Sergei Shtylyov, Wolfram Sang, linux-i2c

On 2017-08-20 21:06, Sergei Shtylyov wrote:
> Use more compact of_property_read_bool() calls for the boolean properties
> instead  of of_find_property() calls  in i2c_mux_reg_probe_dt().
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
> The patch is against Wolfram Sang's 'linux.git' repo's 'i2c/for-next' branch.

Patch applied. For the next time, please use "git format-patch" to generate
your patches (or rather, read and follow the latest incarnation of [1]).
I fixed it up along with a couple of white-space issues this time, since
I was bored and had so little for this merge window. But you generally
can't expect maintainers to do this for you.

Cheers,
Peter

[1] https://www.kernel.org/doc/html/v4.13/process/submitting-patches.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-20 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-20 19:06 [PATCH] i2c: mux: reg: use of_property_read_bool() Sergei Shtylyov
2017-10-13 12:13 ` Sergei Shtylyov
2017-10-13 21:53   ` Peter Rosin
2017-10-20 15:40 ` Peter Rosin

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).