/* em28xx_i2c_recv_bytes() read a byte from the i2c device  */
static int em28xx_i2c_recv_bytes(struct em28xx *dev, unsigned char addr, char *buf, int len)
/* em28xx_i2c_recv_bytes() read a byte from the i2c device  */
static int em28xx_i2c_recv_bytes(struct em28xx *dev, unsigned char addr, char *buf, int len)
{
	int ret;
	ret = dev->em28xx_read_reg_req_len(dev, 2, addr, buf, len);
	if (ret < 0) {
		em28xx_warn("reading i2c device failed (error=%i)\n", ret);
		return ret;
	}
	if (dev->em28xx_read_reg(dev, 0x5) != 0)
		return -ENODEV;
	return ret;
}