vfs: fix return type of ioctl_file_dedupe_range
[linux-2.6-block.git] / include / linux / bcm47xx_nvram.h
CommitLineData
121915c4 1/*
121915c4
WB
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version.
6 */
7
111bd981
HM
8#ifndef __BCM47XX_NVRAM_H
9#define __BCM47XX_NVRAM_H
121915c4
WB
10
11#include <linux/types.h>
59833fcf 12#include <linux/kernel.h>
55cab93b 13#include <linux/vmalloc.h>
121915c4 14
f6e734a8 15#ifdef CONFIG_BCM47XX_NVRAM
21400f25 16int bcm47xx_nvram_init_from_mem(u32 base, u32 lim);
341097f1 17int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len);
62cf3bc0 18int bcm47xx_nvram_gpio_pin(const char *name);
55cab93b
HM
19char *bcm47xx_nvram_get_contents(size_t *val_len);
20static inline void bcm47xx_nvram_release_contents(char *nvram)
21{
22 vfree(nvram);
23};
138173d4
RM
24#else
25static inline int bcm47xx_nvram_init_from_mem(u32 base, u32 lim)
26{
27 return -ENOTSUPP;
28};
29static inline int bcm47xx_nvram_getenv(const char *name, char *val,
30 size_t val_len)
31{
32 return -ENOTSUPP;
33};
34static inline int bcm47xx_nvram_gpio_pin(const char *name)
35{
36 return -ENOTSUPP;
37};
55cab93b
HM
38
39static inline char *bcm47xx_nvram_get_contents(size_t *val_len)
40{
41 return NULL;
42};
43
44static inline void bcm47xx_nvram_release_contents(char *nvram)
45{
46};
138173d4 47#endif
62cf3bc0 48
111bd981 49#endif /* __BCM47XX_NVRAM_H */