lkml.org 
[lkml]   [2016]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regmap: add iopoll-like polling macro
On Wed, Jul 06, 2016 at 04:19:41PM +0200, Philipp Zabel wrote:

> This patch adds a macro regmap_read_poll_timeout that works similar
> to the readx_poll_timeout defined in linux/iopoll.h, except that this
> can also return the error value returned by a failed regmap_read.

Please make this a proper function.

> + if (sleep_us) \
> + usleep_range((sleep_us >> 2) + 1, sleep_us); \

Just write / 4 rather than a shift, the compiler should do the right
thing and it's easier for readers.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2016-07-07 12:21    [W:0.268 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site