linux/compat.h: Add wait_event_timeout macro
authorOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Thu, 6 Aug 2020 09:42:51 +0000 (12:42 +0300)
committerTom Rini <trini@konsulko.com>
Fri, 14 Aug 2020 19:18:30 +0000 (15:18 -0400)
commit242587dca4a7e34023b4c87d5b52a74b2fe7255d
tree84599821a1cae0230808e56e68a63b6559090739
parent384d5cfe5d7e391a5584492bb2ce5794cbd691a9
linux/compat.h: Add wait_event_timeout macro

Add  wait_event_timeout - sleep until a condition gets true or a
timeout elapses.

This is a stripped version of the same from Linux kernel with the
following u-boot specific modifications:
- no wait queues supported
- use u-boot timer to detect timeouts
- check for Ctrl-C pressed during wait

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
[trini: Drop atomic_read from gadget/ether.c as this has existed for a
        while and now causes problems]
Signed-off-by: Tom Rini <trini@konsulko.com>
drivers/usb/gadget/ether.c
include/linux/compat.h