aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2018-06-01 11:30:53 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-06-01 13:16:24 +0200
commit64379af8c6345623c985f00b272decd29057a8d5 (patch)
treeb4f480821e7c0422678d71e59170969c8717f4d4 /drivers/staging
parentstaging: mt7621-gpio: dt-bindings: update documentation for #interrupt-cells property (diff)
downloadlinux-dev-64379af8c6345623c985f00b272decd29057a8d5.tar.xz
linux-dev-64379af8c6345623c985f00b272decd29057a8d5.zip
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: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/mt7621-gpio/gpio-mt7621.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c b/drivers/staging/mt7621-gpio/gpio-mt7621.c
index 79b8c5868e1e..a8adee3b59b3 100644
--- a/drivers/staging/mt7621-gpio/gpio-mt7621.c
+++ b/drivers/staging/mt7621-gpio/gpio-mt7621.c
@@ -47,14 +47,10 @@ struct mtk_data {
struct mtk_gc *gc_map[MTK_BANK_CNT];
};
-static inline struct mtk_gc
-*to_mediatek_gpio(struct gpio_chip *chip)
+static inline struct mtk_gc *
+to_mediatek_gpio(struct gpio_chip *chip)
{
- struct mtk_gc *mgc;
-
- mgc = container_of(chip, struct mtk_gc, chip);
-
- return mgc;
+ return container_of(chip, struct mtk_gc, chip);
}
static inline void