if (__device_refresh(REFRESH_SYNC)) 
if (__device_refresh_sync()) 
static int hdaps_device_init(void){	unsigned int total_msecs = INIT_TIMEOUT_MSECS;	int ret = -ENXIO;	down(&hdaps_sem);	outb(0x13, 0x1610);	outb(0x01, 0x161f);	if (__wait_latch(0x161f, 0x00))		goto out;	/*	 * The 0x03 value appears to only work on some thinkpads, such as the	 * T42p.  Others return 0x01.	 *	 * The 0x02 value occurs when the chip has been previously initialized.	 */	if (__check_latch(0x1611, 0x03) &&		     __check_latch(0x1611, 0x02) &&		     __check_latch(0x1611, 0x01))		goto out;	printk(KERN_DEBUG "hdaps: initial latch check good (0x%02x).\n",	       __get_latch(0x1611));	outb(0x17, 0x1610);	outb(0x81, 0x1611);	outb(0x01, 0x161f);	if (__wait_latch(0x161f, 0x00))		goto out;	if (__wait_latch(0x1611, 0x00))		goto out;	if (__wait_latch(0x1612, 0x60))		goto out;	if (__wait_latch(0x1613, 0x00))		goto out;	outb(0x14, 0x1610);	outb(0x01, 0x1611);	outb(0x01, 0x161f);	if (__wait_latch(0x161f, 0x00))		goto out;	outb(0x10, 0x1610);	outb(0xc8, 0x1611);	outb(0x00, 0x1612);	outb(0x02, 0x1613);	outb(0x01, 0x161f);	if (__wait_latch(0x161f, 0x00))		goto out;	if (__device_refresh(REFRESH_SYNC))		goto out;	if (__wait_latch(0x1611, 0x00))		goto out;	/* we have done our dance, now let's wait for the applause */	while (total_msecs > 0) {		u8 ignored;		/* a read of the device helps push it into action */		__hdaps_readb_one(HDAPS_PORT_UNKNOWN, &ignored);		if (!__wait_latch(0x1611, 0x02)) {			ret = 0;			break;		}		msleep(INIT_WAIT_MSECS);		total_msecs -= INIT_WAIT_MSECS;	}out:	up(&hdaps_sem);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/393ad299658d8464149820363ee09bdf3fd45566/hdaps.c/clean/drivers/hwmon/hdaps.c