X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=package%2Fsystem%2Frtc-rv5c386a%2Fsrc%2Frtc.c;fp=package%2Fsystem%2Frtc-rv5c386a%2Fsrc%2Frtc.c;h=2fc6f093cf6bf017fc1711b8e91880fceaef918a;hb=e2a6028da3eccac80337a17129174ae2d7716b66;hp=25e5331409894c9bc24532fe3d7a915b05b75b61;hpb=ae4d4c4a99d64d402a985e12510a5e05598c6200;p=openwrt.git diff --git a/package/system/rtc-rv5c386a/src/rtc.c b/package/system/rtc-rv5c386a/src/rtc.c index 25e5331409..2fc6f093cf 100644 --- a/package/system/rtc-rv5c386a/src/rtc.c +++ b/package/system/rtc-rv5c386a/src/rtc.c @@ -62,7 +62,7 @@ #endif #include -#include +#include #define RTC_IS_OPEN 0x01 /* Means /dev/rtc is in use. */ @@ -530,7 +530,7 @@ static void platform_detect(void) int et0phyaddr, et1phyaddr; /* Based on "model_no". */ - if (nvram_getenv("model_no", buf, sizeof(buf)) >= 0) { + if (bcm47xx_nvram_getenv("model_no", buf, sizeof(buf)) >= 0) { if (startswith(buf, "WL700")) { /* WL700* */ sda_index = 2; scl_index = 5; @@ -538,12 +538,12 @@ static void platform_detect(void) } } - if (nvram_getenv("et0phyaddr", buf, sizeof(buf)) >= 0 ) + if (bcm47xx_nvram_getenv("et0phyaddr", buf, sizeof(buf)) >= 0 ) et0phyaddr = simple_strtoul(buf, NULL, 0); - if (nvram_getenv("et1phyaddr", buf, sizeof(buf)) >= 0 ) + if (bcm47xx_nvram_getenv("et1phyaddr", buf, sizeof(buf)) >= 0 ) et1phyaddr = simple_strtoul(buf, NULL, 0); - if (nvram_getenv("hardware_version", buf, sizeof(buf)) >= 0) { + if (bcm47xx_nvram_getenv("hardware_version", buf, sizeof(buf)) >= 0) { /* Either WL-300g or WL-HDD, do more extensive checks */ if (startswith(buf, "WL300-") && et0phyaddr == 0 && et1phyaddr == 1) { sda_index = 4;