summaryrefslogtreecommitdiff
path: root/include/linux/nvram.h
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2019-01-15 15:18:56 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-22 10:21:43 +0100
commit2d58636e0af724f38acad25246c1625efec36122 (patch)
treedb6c44e29c9245169f2ce530f3ee30bce4fe9848 /include/linux/nvram.h
parentd5bbb5021ce8d9ff561c7469f5b4589ccb3bc4a6 (diff)
char/nvram: Allow the set_checksum and initialize ioctls to be omitted
The drivers/char/nvram.c module has previously supported only RTC "CMOS" NVRAM, for which it provides appropriate checksum ioctls. Make these ioctls optional so the module can be re-used with other kinds of NVRAM. The ops struct methods that implement the ioctls now return error codes so that a multi-platform kernel binary can do the right thing when running on hardware without a suitable NVRAM. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/nvram.h')
-rw-r--r--include/linux/nvram.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/nvram.h b/include/linux/nvram.h
index bb4ea8cc6ea6..31c763087746 100644
--- a/include/linux/nvram.h
+++ b/include/linux/nvram.h
@@ -31,6 +31,8 @@ struct nvram_ops {
void (*write_byte)(unsigned char, int);
ssize_t (*read)(char *, size_t, loff_t *);
ssize_t (*write)(char *, size_t, loff_t *);
+ long (*initialize)(void);
+ long (*set_checksum)(void);
};
extern const struct nvram_ops arch_nvram_ops;