From aaa63093dd4c393391a3368e1c7305b0cc620571 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Thu, 29 Aug 2013 16:55:45 +1000 Subject: 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 --- arch/powerpc/sysdev/scom.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch/powerpc/sysdev/scom.c') 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"); -- cgit v1.2.3