habanalabs: use proper max_power variable for device utilization
authorTomer Tayar <ttayar@habana.ai>
Mon, 17 Jan 2022 22:21:49 +0000 (00:21 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 28 Feb 2022 12:22:05 +0000 (14:22 +0200)
commit35629bc171b642d5f0bbb59345471d20ecff5ff7
treef81604471bd55fd924fe9032ab35ba38d7a4f5bd
parentd01e6cc97b44d8501b5c24a36d60c9cab94640cd
habanalabs: use proper max_power variable for device utilization

The max_power variable which is used for calculating the device
utilization is the ASIC specific property which is set during init.
However, the max value can be modified via sysfs, and thus the updated
value in the device structure should be used instead.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/device.c