diff options
author | Johan Hovold <johan@kernel.org> | 2017-01-26 12:37:32 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-27 09:29:23 +0100 |
commit | 33b8807a6fe10d0e675e0704444373a6fad93188 (patch) | |
tree | fcee4b762409698da1ef63438f4efd342b8c335d /drivers/staging/fbtft | |
parent | 946d7c78a07e78bcfb9e47d123e3f0c216bc3c74 (diff) |
staging: greybus: loopback: fix broken udelay
The loopback driver allows the user to set a minimum delay of up to one
second to be inserted between test iterations (i.e. request
submissions). The delay is currently specified in microseconds and is
implemented using udelay.
Busy looping for long periods is not just anti-social; udelay must not
be used for delays longer than a few milliseconds due to the risk of
integer overflow.
Replace the broken udelay with a usleep_range with a 100 us range for
short delays (< 20 ms) and otherwise revert to using msleep.
Fixes: b36f04fa9417 ("greybus: loopback: Convert thread delay to microseconds")
Signed-off-by: Johan Hovold <johan@kernel.org>
Cc: stable <stable@vger.kernel.org> # 4.9+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft')
0 files changed, 0 insertions, 0 deletions