projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cbbe9c
)
leds: lgm-sso: Drop duplicate NULL check for GPIO operations
author
Andy Shevchenko
<andy.shevchenko@gmail.com>
Mon, 10 May 2021 09:50:29 +0000
(12:50 +0300)
committer
Pavel Machek
<pavel@ucw.cz>
Fri, 28 May 2021 10:00:01 +0000
(12:00 +0200)
Since GPIO operations are NULL-aware, we don't need to duplicate
this check. Remove it and fold the rest of the code.
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/blink/leds-lgm-sso.c
patch
|
blob
|
history
diff --git
a/drivers/leds/blink/leds-lgm-sso.c
b/drivers/leds/blink/leds-lgm-sso.c
index
0b5e199
..
885e127
100644
(file)
--- a/
drivers/leds/blink/leds-lgm-sso.c
+++ b/
drivers/leds/blink/leds-lgm-sso.c
@@
-258,7
+258,7
@@
static void sso_led_brightness_set(struct led_classdev *led_cdev,
1 << desc->pin);
}
- if (!desc->hw_trig
&& led->gpiod
)
+ if (!desc->hw_trig)
gpiod_set_value(led->gpiod, val);
}