projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c52bd5
)
gpio: of: remove unnecessary variable in of_get_gpio_hog()
author
Masahiro Yamada
<
[email protected]
>
Tue, 14 Jul 2015 01:01:44 +0000
(10:01 +0900)
committer
Linus Walleij
<
[email protected]
>
Wed, 15 Jul 2015 22:11:03 +0000
(
00:11
+0200)
The variable "desc" is only used for storing the return value at the
end of the function. It is unneeded.
Signed-off-by: Masahiro Yamada <
[email protected]
>
Acked-by: Alexandre Courbot <
[email protected]
>
Signed-off-by: Linus Walleij <
[email protected]
>
drivers/gpio/gpiolib-of.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpiolib-of.c
b/drivers/gpio/gpiolib-of.c
index 9a0ec48a47375d18d4d6d17f98e379f30f8e9ec8..fd2db4b3a709e8f163e00adfd38a3d60cbaafb93 100644
(file)
--- a/
drivers/gpio/gpiolib-of.c
+++ b/
drivers/gpio/gpiolib-of.c
@@
-136,7
+136,6
@@
static struct gpio_desc *of_get_gpio_hog(struct device_node *np,
{
struct device_node *chip_np;
enum of_gpio_flags xlate_flags;
- struct gpio_desc *desc;
struct gg_data gg_data = {
.flags = &xlate_flags,
};
@@
-193,9
+192,7
@@
static struct gpio_desc *of_get_gpio_hog(struct device_node *np,
if (name && of_property_read_string(np, "line-name", name))
*name = np->name;
- desc = gg_data.out_gpio;
-
- return desc;
+ return gg_data.out_gpio;
}
/**