summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2017-10-20 10:31:15 -0600
committerAaron Durbin <adurbin@chromium.org>2017-10-20 22:49:27 +0000
commitbd885c5bac425c589582a610bd2dc92dd3809e06 (patch)
treedfad052957c4e2d805c7be1ca3d306997c45bd17 /src/lib
parente8e72bd0ca3ea84ba21db4318589e5c903085419 (diff)
downloadcoreboot-bd885c5bac425c589582a610bd2dc92dd3809e06.tar.xz
lib/gpio: constify array inputs
The arrays of gpio_t are not manipulated in any way within the gpio library. Add const to indicate that. Change-Id: Ie32ab9de967ece22317e2b97b62e85b0757b910d Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/22121 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/gpio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/gpio.c b/src/lib/gpio.c
index ca0aebedf5..48db262a11 100644
--- a/src/lib/gpio.c
+++ b/src/lib/gpio.c
@@ -19,7 +19,7 @@
#include <delay.h>
#include <gpio.h>
-static int _gpio_base2_value(gpio_t gpio[], int num_gpio)
+static int _gpio_base2_value(const gpio_t gpio[], int num_gpio)
{
int i, result = 0;
@@ -32,7 +32,7 @@ static int _gpio_base2_value(gpio_t gpio[], int num_gpio)
return result;
}
-int gpio_base2_value(gpio_t gpio[], int num_gpio)
+int gpio_base2_value(const gpio_t gpio[], int num_gpio)
{
int i;
@@ -42,7 +42,7 @@ int gpio_base2_value(gpio_t gpio[], int num_gpio)
return _gpio_base2_value(gpio, num_gpio);
}
-int gpio_pulldown_base2_value(gpio_t gpio[], int num_gpio)
+int gpio_pulldown_base2_value(const gpio_t gpio[], int num_gpio)
{
int i;
@@ -52,7 +52,7 @@ int gpio_pulldown_base2_value(gpio_t gpio[], int num_gpio)
return _gpio_base2_value(gpio, num_gpio);
}
-int gpio_pullup_base2_value(gpio_t gpio[], int num_gpio)
+int gpio_pullup_base2_value(const gpio_t gpio[], int num_gpio)
{
int i;
@@ -62,7 +62,7 @@ int gpio_pullup_base2_value(gpio_t gpio[], int num_gpio)
return _gpio_base2_value(gpio, num_gpio);
}
-int _gpio_base3_value(gpio_t gpio[], int num_gpio, int binary_first)
+int _gpio_base3_value(const gpio_t gpio[], int num_gpio, int binary_first)
{
/*
* GPIOs which are tied to stronger external pull up or pull down