diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-03-14 13:42:21 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-03-14 13:42:21 +0000 |
commit | 80840457a5561f1e60832e021821cc33adafcffd (patch) | |
tree | 9859937d323fa5c6014b34ab34cc7d5306b8c8cf /package/switch/src | |
parent | dcfbd5f656340581e30b08dfa2ec539c4fb89e31 (diff) | |
download | upstream-80840457a5561f1e60832e021821cc33adafcffd.tar.gz upstream-80840457a5561f1e60832e021821cc33adafcffd.tar.bz2 upstream-80840457a5561f1e60832e021821cc33adafcffd.zip |
fix kmod-switch compile on brcm-2.4 (#1461)
SVN-Revision: 6565
Diffstat (limited to 'package/switch/src')
-rw-r--r-- | package/switch/src/switch-adm.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/package/switch/src/switch-adm.c b/package/switch/src/switch-adm.c index 8d96316b7c..0fb21ffaaf 100644 --- a/package/switch/src/switch-adm.c +++ b/package/switch/src/switch-adm.c @@ -75,7 +75,7 @@ MODULE_PARM(force, "i"); #define atoi(str) simple_strtoul(((str != NULL) ? str : ""), NULL, 0) -#if defined(BCMGPIO2) || defined(BCMGPIO) +#ifdef BROADCOM extern char *nvram_get(char *name); /* Return gpio pin number assigned to the named pin */ @@ -86,7 +86,7 @@ extern char *nvram_get(char *name); * * 'def_pin' is returned if there is no such variable found. */ -static unsigned int getgpiopin(char *pin_name, unsigned int def_pin) +static unsigned int get_gpiopin(char *pin_name, unsigned int def_pin) { char name[] = "gpioXXXX"; char *val; @@ -496,25 +496,25 @@ static int detect_adm(void) { int ret = 0; -#if defined(BCMGPIO2) || defined(BCMGPIO) +#ifdef BROADCOM int boardflags = atoi(nvram_get("boardflags")); int boardnum = atoi(nvram_get("boardnum")); if (boardnum == 44) { /* Trendware TEW-411BRP+ */ ret = 1; - eecs = getgpiopin("adm_eecs", 2); - eesk = getgpiopin("adm_eesk", 3); - eedi = getgpiopin("adm_eedi", 4); - eerc = getgpiopin("adm_rc", 5); + eecs = get_gpiopin("adm_eecs", 2); + eesk = get_gpiopin("adm_eesk", 3); + eedi = get_gpiopin("adm_eedi", 4); + eerc = get_gpiopin("adm_rc", 5); } else if ((boardflags & 0x80) || force) { ret = 1; - eecs = getgpiopin("adm_eecs", 2); - eesk = getgpiopin("adm_eesk", 3); - eedi = getgpiopin("adm_eedi", 4); - eerc = getgpiopin("adm_rc", 0); + eecs = get_gpiopin("adm_eecs", 2); + eesk = get_gpiopin("adm_eesk", 3); + eedi = get_gpiopin("adm_eedi", 4); + eerc = get_gpiopin("adm_rc", 0); } else if ((strcmp(nvram_get("boardtype") ?: "", "bcm94710dev") == 0) && (strncmp(nvram_get("boardnum") ?: "", "42", 2) == 0)) { |