* [PATCH] input: Port rotary_encoder to of_property_read_bool
@ 2013-12-17 0:10 Ben Gamari
2015-10-03 18:44 ` Ezequiel Garcia
0 siblings, 1 reply; 2+ messages in thread
From: Ben Gamari @ 2013-12-17 0:10 UTC (permalink / raw)
To: linux-input; +Cc: Ben Gamari
---
drivers/input/misc/rotary_encoder.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c
index f920ba7..52049db 100644
--- a/drivers/input/misc/rotary_encoder.c
+++ b/drivers/input/misc/rotary_encoder.c
@@ -175,12 +175,9 @@ static struct rotary_encoder_platform_data *rotary_encoder_parse_dt(struct devic
pdata->gpio_b = of_get_gpio_flags(np, 1, &flags);
pdata->inverted_b = flags & OF_GPIO_ACTIVE_LOW;
- pdata->relative_axis = !!of_get_property(np,
- "rotary-encoder,relative-axis", NULL);
- pdata->rollover = !!of_get_property(np,
- "rotary-encoder,rollover", NULL);
- pdata->half_period = !!of_get_property(np,
- "rotary-encoder,half-period", NULL);
+ pdata->relative_axis = of_property_read_bool(np, "rotary-encoder,relative-axis");
+ pdata->rollover = of_property_read_bool(np, "rotary-encoder,rollover");
+ pdata->half_period = of_property_read_bool(np, "rotary-encoder,half-period");
return pdata;
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] input: Port rotary_encoder to of_property_read_bool
2013-12-17 0:10 [PATCH] input: Port rotary_encoder to of_property_read_bool Ben Gamari
@ 2015-10-03 18:44 ` Ezequiel Garcia
0 siblings, 0 replies; 2+ messages in thread
From: Ezequiel Garcia @ 2015-10-03 18:44 UTC (permalink / raw)
To: Ben Gamari; +Cc: linux-input@vger.kernel.org, Dmitry Torokhov
On 16 December 2013 at 21:10, Ben Gamari <bgamari.foss@gmail.com> wrote:
> ---
> drivers/input/misc/rotary_encoder.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c
> index f920ba7..52049db 100644
> --- a/drivers/input/misc/rotary_encoder.c
> +++ b/drivers/input/misc/rotary_encoder.c
> @@ -175,12 +175,9 @@ static struct rotary_encoder_platform_data *rotary_encoder_parse_dt(struct devic
> pdata->gpio_b = of_get_gpio_flags(np, 1, &flags);
> pdata->inverted_b = flags & OF_GPIO_ACTIVE_LOW;
>
> - pdata->relative_axis = !!of_get_property(np,
> - "rotary-encoder,relative-axis", NULL);
> - pdata->rollover = !!of_get_property(np,
> - "rotary-encoder,rollover", NULL);
> - pdata->half_period = !!of_get_property(np,
> - "rotary-encoder,half-period", NULL);
> + pdata->relative_axis = of_property_read_bool(np, "rotary-encoder,relative-axis");
> + pdata->rollover = of_property_read_bool(np, "rotary-encoder,rollover");
> + pdata->half_period = of_property_read_bool(np, "rotary-encoder,half-period");
>
> return pdata;
> }
> --
> 1.8.3.2
>
Hm, looks like this one felt through the cracks. It applies cleanly on
linux-next
and it looks fine, except the commit log is a bit off.
Ben, you should resend this one. The format is not quite right:
* needs your Signed-off-by
* needs some commit log. Something simple like "This commit is a
cosmetic cleanup,
changing the driver to use of_property_read_bool to read boolean
devicetree properties."
* needs a better subject "input: rotary-encoder: Use of_property_read_bool".
Feel free to add my Acked-by to it.
Thanks,
--
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-03 18:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-17 0:10 [PATCH] input: Port rotary_encoder to of_property_read_bool Ben Gamari
2015-10-03 18:44 ` Ezequiel Garcia
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).