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>
This commit is contained in:
Benjamin Herrenschmidt
2013-08-29 16:55:45 +10:00
parent ac237b65f5
commit aaa63093dd
5 changed files with 46 additions and 23 deletions

View File

@@ -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");