]> git.dujemihanovic.xyz Git - u-boot.git/commit
i2c: i2c-cdns: Reorder timeout loop for interrupt waiting
authorMoritz Fischer <moritz.fischer@ettus.com>
Mon, 16 Jan 2017 17:50:45 +0000 (09:50 -0800)
committerHeiko Schocher <hs@denx.de>
Wed, 18 Jan 2017 05:38:14 +0000 (06:38 +0100)
commit0ec0c5864365f3f222e1652aca98cfbd86bae890
tree5cb15f8c52c292e1a23810e0224f409de3bbc7d1
parent5e429852085119aa7e7a4437f588ae3a2424a3f6
i2c: i2c-cdns: Reorder timeout loop for interrupt waiting

Reorder the timeout loop such that we first check if the
condition is already true, and then call udelay() so if
the condition is already true, break early.

Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: u-boot@lists.denx.de
drivers/i2c/i2c-cdns.c