diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-05-10 12:56:58 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-07-12 02:17:45 -0400 |
commit | 95b4b9d97a5bb6a93ec269cb9cf85e95a8f8295d (patch) | |
tree | 8717427f06e5ac86318f687936c91668187ba5cc /arch/blackfin/include/asm/gpio.h | |
parent | 272d2fc2f5184740e5890e9afeb9fd78d308e51a (diff) | |
download | u-boot-imx-95b4b9d97a5bb6a93ec269cb9cf85e95a8f8295d.zip u-boot-imx-95b4b9d97a5bb6a93ec269cb9cf85e95a8f8295d.tar.gz u-boot-imx-95b4b9d97a5bb6a93ec269cb9cf85e95a8f8295d.tar.bz2 |
Blackfin: gpio: optimize free path a little
When we aren't doing resource tracking, the gpio_free() function is a
stub that simply returns, so pull this logic up a level and make it an
inline stub in the header. Now we don't have to waste time at any of
the call sites.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/include/asm/gpio.h')
-rw-r--r-- | arch/blackfin/include/asm/gpio.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h index 9c0e5d1..224688f 100644 --- a/arch/blackfin/include/asm/gpio.h +++ b/arch/blackfin/include/asm/gpio.h @@ -142,8 +142,10 @@ struct gpio_port_t { #ifdef CONFIG_BFIN_GPIO_TRACK void bfin_gpio_labels(void); +void bfin_gpio_free(unsigned gpio); #else #define bfin_gpio_labels() +#define bfin_gpio_free(gpio) #define bfin_gpio_request(gpio, label) bfin_gpio_request(gpio) #define bfin_special_gpio_request(gpio, label) bfin_special_gpio_request(gpio) #endif @@ -154,7 +156,6 @@ int bfin_special_gpio_request(unsigned gpio, const char *label); #endif int bfin_gpio_request(unsigned gpio, const char *label); -void bfin_gpio_free(unsigned gpio); int bfin_gpio_direction_input(unsigned gpio); int bfin_gpio_direction_output(unsigned gpio, int value); int bfin_gpio_get_value(unsigned gpio); |