From: Brian Norris Date: Wed, 5 Nov 2014 10:32:03 +0000 (-0800) Subject: mtd: spi-nor: improve wait-till-ready timeout loop X-Git-Tag: omap-for-v3.19/fixes-rc1~56^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a95ce92e4b289228c51114dd19f714388093d52b;p=pandora-kernel.git mtd: spi-nor: improve wait-till-ready timeout loop There are a few small issues with the timeout loop in spi_nor_wait_till_ready(): * The first operation should not be a reschedule; we should check the status register at least once to see if we're complete! * We should check the status register one last time after declaring the deadline has passed, to prevent a premature timeout error (this is theoretically possible if we sleep for a long time after the previous status register check). * Add an error message, so it's obvious if we ever hit a timeout. Signed-off-by: Brian Norris Acked-by: Huang Shijie Reviewed-by: Ezequiel Garcia --- Reading git-diff-tree failed