diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2019-01-15 05:18:56 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-22 10:21:44 +0100 |
commit | 109b3a89a7c48405d61a05d7a1720581a4f1574c (patch) | |
tree | 00bfc8a815366b81e44fe00580cfcb593a6bd429 /drivers/char/Kconfig | |
parent | char/nvram: Allow the set_checksum and initialize ioctls to be omitted (diff) | |
download | linux-109b3a89a7c48405d61a05d7a1720581a4f1574c.tar.xz linux-109b3a89a7c48405d61a05d7a1720581a4f1574c.zip |
char/nvram: Implement NVRAM read/write methods
Refactor the RTC "CMOS" NVRAM functions so that they can be used as
arch_nvram_ops methods. Checksumming logic is moved from the misc device
operations to the nvram read/write operations. This makes the misc device
implementation more generic.
This preserves the locking mechanism such that "read if checksum valid"
and "write and update checksum" remain atomic operations.
Some platforms implement byte-range read/write methods which are similar
to file_operations struct methods. Other platforms provide only
byte-at-a-time methods. The former are more efficient but may be
unavailable so fall back on the latter methods when necessary.
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/Kconfig')
0 files changed, 0 insertions, 0 deletions