/* i2c_pxa_master_complete - complete the message and wake up.  */
static void i2c_pxa_master_complete(struct pxa_i2c *i2c, int ret)
/* i2c_pxa_master_complete - complete the message and wake up.  */
static void i2c_pxa_master_complete(struct pxa_i2c *i2c, int ret)
{
	i2c->msg_ptr = 0;
	i2c->msg = NULL;
	i2c->msg_idx ++;
	i2c->msg_num = 0;
	if (ret)
		i2c->msg_idx = ret;
	if (!i2c->use_pio)
		wake_up(&i2c->wait);
}