On Tue, Mar 26, 2013 at 11:22:54AM -0700, H Hartley Sweeten wrote: > @@ -284,20 +274,19 @@ static uint32_t I2Chandshake(struct comedi_device *dev, uint32_t val) > while (!s626_mc_test(dev, MC2_UPLD_IIC, P_MC2)) > ; > > - /* Wait until I2C bus transfer is finished or an error occurs. */ > - while ((RR7146(P_I2CCTRL) & (I2C_BUSY | I2C_ERR)) == I2C_BUSY) > - ; > - > - /* Return non-zero if I2C error occurred. */ > - return RR7146(P_I2CCTRL) & I2C_ERR; > + /* Wait until I2C bus transfer is finished or an error occurs */ > + do { > + ctrl = readl(devpriv->base_addr + P_I2CCTRL); > + } while ((ctrl & (I2C_BUSY | I2C_ERR)) == I2C_BUSY); > > + /* Return non-zero if I2C error occurred */ > + return ctrl & I2C_ERR; > } I look at this like a bugfix because now the normal case is to only read one time. Good job. regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel