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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
d5bbb5021c
commit
2d58636e0a
@@ -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;
|
||||
|
Reference in New Issue
Block a user