diff options
author | Ofir Bitton <obitton@habana.ai> | 2021-12-15 14:48:27 +0200 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-12-26 08:59:09 +0200 |
commit | a7224c21161b3576cb6875ac86f5ba5e757e4fce (patch) | |
tree | 00ede69b0971099a07bf3556f92cec0836362a05 /drivers/misc | |
parent | b9d31cada7d9f137028c11534fff77fec8511690 (diff) | |
download | linux-a7224c21161b3576cb6875ac86f5ba5e757e4fce.tar.bz2 |
habanalabs: fix endianness when reading cpld version
Current sysfs implementation does not take endianness into
consideration when dumping the cpld version.
Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/habanalabs/common/sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/common/sysfs.c b/drivers/misc/habanalabs/common/sysfs.c index 2f6de734ce37..1af568e46f46 100644 --- a/drivers/misc/habanalabs/common/sysfs.c +++ b/drivers/misc/habanalabs/common/sysfs.c @@ -139,7 +139,7 @@ static ssize_t cpld_ver_show(struct device *dev, struct device_attribute *attr, struct hl_device *hdev = dev_get_drvdata(dev); return sprintf(buf, "0x%08x\n", - hdev->asic_prop.cpucp_info.cpld_version); + le32_to_cpu(hdev->asic_prop.cpucp_info.cpld_version)); } static ssize_t cpucp_kernel_ver_show(struct device *dev, |