/* em28xx_i2c_check_for_device() check if there is a i2c_device at the supplied address  */
static int em28xx_i2c_check_for_device(struct em28xx *dev, unsigned char addr)
/* em28xx_i2c_check_for_device() check if there is a i2c_device at the supplied address  */
static int em28xx_i2c_check_for_device(struct em28xx *dev, unsigned char addr)
{
	char msg;
	int ret;
	msg = addr;
	ret = dev->em28xx_read_reg_req(dev, 2, addr);
	if (ret < 0) {
		em28xx_warn("reading from i2c device failed (error=%i)\n", ret);
		return ret;
	}
	if (dev->em28xx_read_reg(dev, 0x5) != 0)
		return -ENODEV;
	return 0;
}