]> git.baikalelectronics.ru Git - kernel.git/commit
nvmem: sunxi_sid: Read out SID for randomness without looping
authorChen-Yu Tsai <wens@csie.org>
Sat, 13 Apr 2019 10:32:49 +0000 (11:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Apr 2019 17:43:11 +0000 (19:43 +0200)
commita5e8dece6688e53292cbe5fffe674f7a323b8ef7
treec3070ab54583aa7ea61c366800c926604a4a8a66
parent068642b134f351f887d8d7d22d0bfe66342fe1a7
nvmem: sunxi_sid: Read out SID for randomness without looping

Since the reg_read callbacks already support arbitrary, but 4-byte
aligned. offsets and lengths into the SID, there is no need for another
for loop just to use it to read 1 byte at a time.

Read out the whole SID block in one go.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/sunxi_sid.c