linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] leds: gpio: Use GPIOF_OUT_INIT_LOW instead of hardcoded zero
@ 2016-02-19  9:52 Geert Uytterhoeven
  2016-02-19 15:29 ` Jacek Anaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2016-02-19  9:52 UTC (permalink / raw)
  To: Richard Purdie, Jacek Anaszewski
  Cc: linux-leds, linux-gpio, Geert Uytterhoeven

Use the GPIO flag definition instead of a numeric literal, so the casual
reader grepping for GPIOF_ will find the GPIO flags used.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/leds/leds-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 7bc53280dbfdd91d..89955574430cec75 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -86,7 +86,7 @@ static int create_gpio_led(const struct gpio_led *template,
 		 * still uses GPIO numbers. Ultimately we would like to get
 		 * rid of this block completely.
 		 */
-		unsigned long flags = 0;
+		unsigned long flags = GPIOF_OUT_INIT_LOW;
 
 		/* skip leds that aren't available */
 		if (!gpio_is_valid(template->gpio)) {
-- 
1.9.1


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

* Re: [PATCH] leds: gpio: Use GPIOF_OUT_INIT_LOW instead of hardcoded zero
  2016-02-19  9:52 [PATCH] leds: gpio: Use GPIOF_OUT_INIT_LOW instead of hardcoded zero Geert Uytterhoeven
@ 2016-02-19 15:29 ` Jacek Anaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Jacek Anaszewski @ 2016-02-19 15:29 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Richard Purdie, linux-leds, linux-gpio

Hi Geert,

On 02/19/2016 10:52 AM, Geert Uytterhoeven wrote:
> Use the GPIO flag definition instead of a numeric literal, so the casual
> reader grepping for GPIOF_ will find the GPIO flags used.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>   drivers/leds/leds-gpio.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
> index 7bc53280dbfdd91d..89955574430cec75 100644
> --- a/drivers/leds/leds-gpio.c
> +++ b/drivers/leds/leds-gpio.c
> @@ -86,7 +86,7 @@ static int create_gpio_led(const struct gpio_led *template,
>   		 * still uses GPIO numbers. Ultimately we would like to get
>   		 * rid of this block completely.
>   		 */
> -		unsigned long flags = 0;
> +		unsigned long flags = GPIOF_OUT_INIT_LOW;
>
>   		/* skip leds that aren't available */
>   		if (!gpio_is_valid(template->gpio)) {
>

Applied, thanks.

-- 
Best regards,
Jacek Anaszewski

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

end of thread, other threads:[~2016-02-19 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-19  9:52 [PATCH] leds: gpio: Use GPIOF_OUT_INIT_LOW instead of hardcoded zero Geert Uytterhoeven
2016-02-19 15:29 ` Jacek Anaszewski

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