diff options
Diffstat (limited to 'drivers/gpu/drm/arm/display/include/malidp_utils.h')
-rw-r--r-- | drivers/gpu/drm/arm/display/include/malidp_utils.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/arm/display/include/malidp_utils.h b/drivers/gpu/drm/arm/display/include/malidp_utils.h index 8cfd91196e15..3bc383d5bf73 100644 --- a/drivers/gpu/drm/arm/display/include/malidp_utils.h +++ b/drivers/gpu/drm/arm/display/include/malidp_utils.h @@ -8,6 +8,7 @@ #define _MALIDP_UTILS_ #include <linux/delay.h> +#include <linux/errno.h> #define has_bit(nr, mask) (BIT(nr) & (mask)) #define has_bits(bits, mask) (((bits) & (mask)) == (bits)) @@ -20,11 +21,9 @@ int num_tries = __tries; \ while (!__cond && (num_tries > 0)) { \ usleep_range(__min_range, __max_range); \ - if (__cond) \ - break; \ num_tries--; \ } \ - num_tries; \ + (__cond) ? 0 : -ETIMEDOUT; \ }) /* the restriction of range is [start, end] */ |