Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 169622 | Differences between
and this patch

Collapse All | Expand All

(-)linux-2.6.20/drivers/sbus/char/bbc_i2c.c.orig (-7 / +6 lines)
Lines 187-205 Link Here
187
	bp->waiting = 1;
187
	bp->waiting = 1;
188
	add_wait_queue(&bp->wq, &wait);
188
	add_wait_queue(&bp->wq, &wait);
189
	while (limit-- > 0) {
189
	while (limit-- > 0) {
190
		u8 val;
190
		long val;
191
191
192
		set_current_state(TASK_INTERRUPTIBLE);
192
		val = wait_event_interruptible_timeout(bp->wq,
193
		*status = val = readb(bp->i2c_control_regs + 0);
193
			(((*status = readb(bp->i2c_control_regs + 0)) & I2C_PCF_PIN) == 0),
194
		if ((val & I2C_PCF_PIN) == 0) {
194
			msecs_to_jiffies(250));
195
		if ((val != -ERESTARTSYS) && (val > 0))  {
195
			ret = 0;
196
			ret = 0;
196
			break;
197
			break;
197
		}
198
		}
198
		msleep_interruptible(250);
199
	}
199
	}
200
	remove_wait_queue(&bp->wq, &wait);
200
	remove_wait_queue(&bp->wq, &wait);
201
	bp->waiting = 0;
201
	bp->waiting = 0;
202
	current->state = TASK_RUNNING;
203
202
204
	return ret;
203
	return ret;
205
}
204
}
Lines 340-346 Link Here
340
	 */
339
	 */
341
	if (bp->waiting &&
340
	if (bp->waiting &&
342
	    !(readb(bp->i2c_control_regs + 0x0) & I2C_PCF_PIN))
341
	    !(readb(bp->i2c_control_regs + 0x0) & I2C_PCF_PIN))
343
		wake_up(&bp->wq);
342
		wake_up_interruptible(&bp->wq);
344
343
345
	return IRQ_HANDLED;
344
	return IRQ_HANDLED;
346
}
345
}

Return to bug 169622