iptables: fix bad PKG_RELEASE in previous commit
[openwrt.git] / package / system / rtc-rv5c386a / src / rtc.c
index 7c51bf4..2fc6f09 100644 (file)
 #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;