summaryrefslogtreecommitdiffstats
path: root/package/system/rtc-rv5c386a/src/rtc.c
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2013-05-26 01:02:55 +0300
committerRoman Yeryomin <roman@advem.lv>2013-05-26 01:02:55 +0300
commit342045a35b1981a89e4bc80842b10c065e1050da (patch)
tree4140720b20e8d641c11da882010d6130a75fef21 /package/system/rtc-rv5c386a/src/rtc.c
parent7338133dde8238afce34676214b494c8db96689b (diff)
parent1a116ce7818ecee5d167a9c0ebb1a0feca9120e6 (diff)
Merge trunk into realtek-unstable
Conflicts: Config.in feeds.conf.default package/base-files/files/etc/hotplug2-common.rules package/network/config/netifd/files/etc/init.d/network
Diffstat (limited to 'package/system/rtc-rv5c386a/src/rtc.c')
-rw-r--r--package/system/rtc-rv5c386a/src/rtc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/package/system/rtc-rv5c386a/src/rtc.c b/package/system/rtc-rv5c386a/src/rtc.c
index 7c51bf4bf..2fc6f093c 100644
--- a/package/system/rtc-rv5c386a/src/rtc.c
+++ b/package/system/rtc-rv5c386a/src/rtc.c
@@ -57,10 +57,12 @@
#include <linux/uaccess.h>
#include <asm/current.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
#include <asm/system.h>
+#endif
#include <bcm47xx.h>
-#include <nvram.h>
+#include <bcm47xx_nvram.h>
#define RTC_IS_OPEN 0x01 /* Means /dev/rtc is in use. */
@@ -528,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;
@@ -536,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;