/* __wait_latch - Wait up to 100us for a port latch to get a certain value, returning zero if the value is obtained. Callers must hold hdaps_mtx.  */
static int __wait_latch(u16 port, u8 val)
/* __wait_latch - Wait up to 100us for a port latch to get a certain value, returning zero if the value is obtained. Callers must hold hdaps_mtx.  */
static int __wait_latch(u16 port, u8 val)
{
	unsigned int i;
	for (i = 0; i < 20; i++) {
		if (!__check_latch(port, val))
			return 0;
		udelay(5);
	}
	return -EIO;
}