diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-12-08 14:54:11 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-12-08 14:54:11 +0100 |
commit | b01bc4c8107f2a003b69a2ca03b925a57c13b28b (patch) | |
tree | 61cc350679a0380d147ddf71b98a3b85f2442cba /include | |
parent | 9b1d12fff0650706eb3c335d31bd378b5d873cb2 (diff) | |
parent | ffc25a119565d1a8588da6a27b4f6627ea5022ae (diff) | |
download | barebox-b01bc4c8107f2a003b69a2ca03b925a57c13b28b.tar.gz barebox-b01bc4c8107f2a003b69a2ca03b925a57c13b28b.tar.xz |
Merge branch 'for-next/randconfig-1'
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/gpio.h | 11 | ||||
-rw-r--r-- | include/gpio.h | 11 | ||||
-rw-r--r-- | include/param.h | 4 |
3 files changed, 13 insertions, 13 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 95fdd05ec9..767497096a 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -1,17 +1,6 @@ #ifndef __ASM_GENERIC_GPIO_H #define __ASM_GENERIC_GPIO_H -#define ARCH_NR_GPIOS 256 - -static inline int gpio_is_valid(int gpio) -{ - if (gpio < 0) - return 0; - if (gpio < ARCH_NR_GPIOS) - return 1; - return 0; -} - void gpio_set_value(unsigned gpio, int value); int gpio_get_value(unsigned gpio); int gpio_direction_output(unsigned gpio, int value); diff --git a/include/gpio.h b/include/gpio.h index 4a97521aee..f116ea6af7 100644 --- a/include/gpio.h +++ b/include/gpio.h @@ -3,6 +3,17 @@ #include <asm/gpio.h> +#define ARCH_NR_GPIOS 256 + +static inline int gpio_is_valid(int gpio) +{ + if (gpio < 0) + return 0; + if (gpio < ARCH_NR_GPIOS) + return 1; + return 0; +} + #define GPIOF_DIR_OUT (0 << 0) #define GPIOF_DIR_IN (1 << 0) diff --git a/include/param.h b/include/param.h index b8dd9b1869..53bee54110 100644 --- a/include/param.h +++ b/include/param.h @@ -67,7 +67,7 @@ struct param_d *dev_add_param_mac(struct device_d *dev, const char *name, int (*get)(struct param_d *p, void *priv), u8 *mac, void *priv); -int dev_add_param_fixed(struct device_d *dev, char *name, const char *value); +int dev_add_param_fixed(struct device_d *dev, const char *name, const char *value); void dev_remove_param(struct param_d *p); @@ -161,7 +161,7 @@ static inline struct param_d *dev_add_param_mac(struct device_d *dev, const char return NULL; } -static inline int dev_add_param_fixed(struct device_d *dev, char *name, char *value) +static inline int dev_add_param_fixed(struct device_d *dev, const char *name, const char *value) { return 0; } |