X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fgpio%2Fkw_gpio.c;h=43b27e3fea1bc86f5fbef46f969a7f8ff0322286;hb=4baa38c51a3187990a31519f8163519eda3890b5;hp=1c2883479cce6589c152e88f8baa7b28bbddd177;hpb=189eec77795553157c087cd45555695fb3ce2433;p=u-boot diff --git a/drivers/gpio/kw_gpio.c b/drivers/gpio/kw_gpio.c index 1c2883479c..43b27e3fea 100644 --- a/drivers/gpio/kw_gpio.c +++ b/drivers/gpio/kw_gpio.c @@ -3,9 +3,7 @@ * * Marvell Orion SoC GPIO handling. * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. + * SPDX-License-Identifier: GPL-2.0+ */ /* @@ -17,7 +15,8 @@ #include #include -#include +#include +#include #include static unsigned long gpio_valid_input[BITS_TO_LONGS(GPIO_MAX)]; @@ -37,7 +36,7 @@ void __set_direction(unsigned pin, int input) u = readl(GPIO_IO_CONF(pin)); } -void __set_level(unsigned pin, int high) +static void __set_level(unsigned pin, int high) { u32 u; @@ -49,7 +48,7 @@ void __set_level(unsigned pin, int high) writel(u, GPIO_OUT(pin)); } -void __set_blinking(unsigned pin, int blink) +static void __set_blinking(unsigned pin, int blink) { u32 u; @@ -95,7 +94,7 @@ void kw_gpio_set_valid(unsigned pin, int mode) */ int kw_gpio_direction_input(unsigned pin) { - if (!kw_gpio_is_valid(pin, GPIO_INPUT_OK)) + if (kw_gpio_is_valid(pin, GPIO_INPUT_OK) != 0) return 1; /* Configure GPIO direction. */