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:Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com> Change-Id: I5ba7041e31be3445d209aeeed2f8933962b3fcb0
Loading
Please sign in to comment