From fd11bea2ccb97909f421e20e6a5ba770dbf39d0b Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 27 Mar 2014 20:34:13 +0000 Subject: blackfin: make name_to_gpio be a weak symbol This required moving it into a C file from the header. The only user of a non-default name_to_gpio is blackfin, therefore build tested with the blackfin bct-brettl2 build, which is one I picked at random. Also tested with a build for the ARM tec board which uses the default/fallback implementation. Inspection with objdump shows that both have done the right thing. This change was requested by Marek during review of the sunxi patch series. Signed-off-by: Ian Campbell Cc: Marek Vasut Cc: Wolfgang Denk Cc: Sonic Zhang --- common/cmd_gpio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'common/cmd_gpio.c') diff --git a/common/cmd_gpio.c b/common/cmd_gpio.c index 778aa5f..aff0445 100644 --- a/common/cmd_gpio.c +++ b/common/cmd_gpio.c @@ -11,9 +11,10 @@ #include #include -#ifndef name_to_gpio -#define name_to_gpio(name) simple_strtoul(name, NULL, 10) -#endif +int __weak name_to_gpio(const char *name) +{ + return simple_strtoul(name, NULL, 10); +} enum gpio_cmd { GPIO_INPUT, -- cgit v1.1