提交 64379af8 编写于 作者: S Sergio Paracuellos 提交者: 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: NSergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NNeilBrown <neil@brown.name>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 4b2fbed7
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册