@@ -96,8 +96,8 @@ static const struct of_device_id tegra_fuse_match[] = {
{ /* sentinel */ }
};
-static int tegra_fuse_read(void *priv, unsigned int offset, void *value,
- size_t bytes)
+static ssize_t tegra_fuse_read(void *priv, unsigned int offset, void *value,
+ size_t bytes)
{
unsigned int count = bytes / 4, i;
struct tegra_fuse *fuse = priv;
@@ -106,7 +106,7 @@ static int tegra_fuse_read(void *priv, unsigned int offset, void *value,
for (i = 0; i < count; i++)
buffer[i] = fuse->read(fuse, offset + i * 4);
- return 0;
+ return bytes;
}
static void tegra_fuse_restore(void *base)
Change nvmem read/write function definition return type to ssize_t. Signed-off-by: Joy Chakraborty <joychakr@google.com> --- drivers/soc/tegra/fuse/fuse-tegra.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)