OSDN Git Service

char/nvram: Allow the set_checksum and initialize ioctls to be omitted
authorFinn Thain <fthain@telegraphics.com.au>
Tue, 15 Jan 2019 04:18:56 +0000 (15:18 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2019 09:21:43 +0000 (10:21 +0100)
commit2d58636e0af724f38acad25246c1625efec36122
treedb6c44e29c9245169f2ce530f3ee30bce4fe9848
parentd5bbb5021ce8d9ff561c7469f5b4589ccb3bc4a6
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>
drivers/char/nvram.c
include/linux/nvram.h