030-backport_bcm47xx_nvram.patch 907 B

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