OSDN Git Service

habanalabs: change polling functions to macros
authorOded Gabbay <oded.gabbay@gmail.com>
Wed, 8 May 2019 22:48:23 +0000 (01:48 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Wed, 8 May 2019 22:48:23 +0000 (01:48 +0300)
commita08b51a9a0f3664bd0d7a18982a35e3f75adc308
treeaf8990c1da63858038c75f90f0224132c89d459d
parent1f2c999bbca31c1f0bbbe69a75f3489f60cce05d
habanalabs: change polling functions to macros

This patch changes two polling functions to macros, in order to make their
API the same as the standard readl_poll_timeout so we would be able to
define the "condition for exit" when calling these macros.

This will simplify the code as it will eliminate the need to check both
for timeout and for the (cond) in the calling function.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/command_submission.c
drivers/misc/habanalabs/device.c
drivers/misc/habanalabs/firmware_if.c
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/habanalabs.h