kernel: drop bcm47xxpart patch for Xiaomi
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-4.1 / 030-backport_bcm47xx_nvram.patch
1 --- a/include/linux/bcm47xx_nvram.h
2 +++ b/include/linux/bcm47xx_nvram.h
3 @@ -10,11 +10,17 @@
4
5 #include <linux/types.h>
6 #include <linux/kernel.h>
7 +#include <linux/vmalloc.h>
8
9 -#ifdef CONFIG_BCM47XX
10 +#ifdef CONFIG_BCM47XX_NVRAM
11 int bcm47xx_nvram_init_from_mem(u32 base, u32 lim);
12 int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len);
13 int bcm47xx_nvram_gpio_pin(const char *name);
14 +char *bcm47xx_nvram_get_contents(size_t *val_len);
15 +static inline void bcm47xx_nvram_release_contents(char *nvram)
16 +{
17 + vfree(nvram);
18 +};
19 #else
20 static inline int bcm47xx_nvram_init_from_mem(u32 base, u32 lim)
21 {
22 @@ -29,6 +35,15 @@ static inline int bcm47xx_nvram_gpio_pin
23 {
24 return -ENOTSUPP;
25 };
26 +
27 +static inline char *bcm47xx_nvram_get_contents(size_t *val_len)
28 +{
29 + return NULL;
30 +};
31 +
32 +static inline void bcm47xx_nvram_release_contents(char *nvram)
33 +{
34 +};
35 #endif
36
37 #endif /* __BCM47XX_NVRAM_H */