habanalabs: modify the return values of hl_read/write routines
authorMoti Haimovski <mhaimovski@habana.ai>
Thu, 23 Jan 2020 16:03:04 +0000 (18:03 +0200)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 24 Mar 2020 08:54:16 +0000 (10:54 +0200)
commitd57b83c3dfe55747f1a43f9d9fbadeff7b5a3cd5
treec1447e4535ff60ffc26edf558ecdba112d0b23b2
parent5557b138dc11a1b93fec69c7d8760d38fc56e580
habanalabs: modify the return values of hl_read/write routines

The hl read and write routines implement the hwmon_ops read and write
interface routines respectively.
These routines are expected to return a completion status when called,
which was not the case until this commit.
This commit modifies these routines to return 0 upon success and a
negative error value upon failure.

Signed-off-by: Moti Haimovski <mhaimovski@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/habanalabs.h
drivers/misc/habanalabs/hwmon.c