misc: Update read() and write() methods to return bytes xfered
authorSimon Glass <sjg@chromium.org>
Tue, 6 Nov 2018 22:21:39 +0000 (15:21 -0700)
committerSimon Glass <sjg@chromium.org>
Wed, 21 Nov 2018 02:14:22 +0000 (19:14 -0700)
commit8729b1ae2cbda83059a55811614a2b0dbfdf7e53
tree65fa9cfd636340f9c9fc97bb3fa76de36c5bf1e2
parent96794a3eaee9bf368efe475f0a040d0e08b09dc9
misc: Update read() and write() methods to return bytes xfered

At present these functions return 0 on success. For some devices we want
to know how many bytes were transferred. It seems useful to adjust the API
to be more like the POSIX read() and write() functions.

Update these two methods, a test and all users.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
arch/arm/mach-stm32mp/cpu.c
drivers/clk/clk_vexpress_osc.c
drivers/misc/altera_sysid.c
drivers/misc/misc_sandbox.c
drivers/misc/rockchip-efuse.c
drivers/misc/stm32mp_fuse.c
include/misc.h
test/dm/misc.c