Commit 64379af8 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

staging: mt7621-gpio: change 'to_mediatek_gpio' to make just a one line return

Function to_mediatek_gpio can directly return without declaring
anything else in its body improving readability. Also change
pointer '*' declaration to be with return type in the upper line.
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: default avatarNeilBrown <neil@brown.name>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4b2fbed7
...@@ -47,14 +47,10 @@ struct mtk_data { ...@@ -47,14 +47,10 @@ struct mtk_data {
struct mtk_gc *gc_map[MTK_BANK_CNT]; struct mtk_gc *gc_map[MTK_BANK_CNT];
}; };
static inline struct mtk_gc static inline struct mtk_gc *
*to_mediatek_gpio(struct gpio_chip *chip) to_mediatek_gpio(struct gpio_chip *chip)
{ {
struct mtk_gc *mgc; return container_of(chip, struct mtk_gc, chip);
mgc = container_of(chip, struct mtk_gc, chip);
return mgc;
} }
static inline void static inline void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment