Commit 10278602 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Greg Kroah-Hartman
Browse files

FROMLIST: net: atlantic: Use readx_poll_timeout() for large timeout

Commit
   8dcf2ad3 ("net: atlantic: add hwmon getter for MAC temperature")

implemented a read callback with an udelay(10000U). This fails to
compile on ARM because the delay is >1ms. I doubt that it is needed to
spin for 10ms even if possible on x86.

>From looking at the code, the context appears to be preemptible so using
usleep() should work and avoid busy spinning.

Use readx_poll_timeout() in the poll loop.

Cc: Mark Starovoytov <mstarovoitov@marvell.com>
Cc: Igor Russkikh <irusskikh@marvell.com>
Link: https://lkml.kernel.org/r/20200818161439.3dkf6jzp3vuwmvvh@linutronix.de


Signed-off-by: default avatarSebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I5ba7041e31be3445d209aeeed2f8933962b3fcb0
parent 92f13cd6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment