summaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev/scom.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-08-29 16:55:45 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-10-11 16:53:34 +1100
commitaaa63093dd4c393391a3368e1c7305b0cc620571 (patch)
tree72947047f91583d57f7983cf3070b19ee584c663 /arch/powerpc/sysdev/scom.c
parentac237b65f56c9b80d7774c35ccce15a74d445621 (diff)
powerpc/scom: Change scom_read() and scom_write() to return errors
scom_read() now returns the read value via a pointer argument and both functions return an int error code Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/scom.c')
-rw-r--r--arch/powerpc/sysdev/scom.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/scom.c b/arch/powerpc/sysdev/scom.c
index 9193e12df695..10f1d9e56612 100644
--- a/arch/powerpc/sysdev/scom.c
+++ b/arch/powerpc/sysdev/scom.c
@@ -137,8 +137,7 @@ static int scom_val_get(void *data, u64 *val)
if (!scom_map_ok(ent->map))
return -EFAULT;
- *val = scom_read(ent->map, 0);
- return 0;
+ return scom_read(ent->map, 0, val);
}
DEFINE_SIMPLE_ATTRIBUTE(scom_val_fops, scom_val_get, scom_val_set,
"0x%llx\n");