dev_dbg(&client->adapter->dev, "master_recv: reading %d bytes.\n", count);  down(&adap->bus_lock); ret = adap->algo->master_xfer(adap,&msg,1); up(&adap->bus_lock);  dev_dbg(&client->adapter->dev, "master_recv: return:%d (count:%d, addr:0x%02x)\n", ret, count, client->addr);  /* if everything went ok (i.e. 1 msg transmitted), return #bytes * transmitted, else error code. */ return (ret == 1 )? count : ret; } else { dev_err(&client->adapter->dev, "I2C level transfers not supported\n"); return -ENOSYS; } 
msg.addr = client->addr; msg.flags = client->flags & I2C_M_TEN; msg.flags |= I2C_M_RD; msg.len = count; msg.buf = buf;  ret = i2c_transfer(adap, &msg, 1);  /* If everything went ok (i.e. 1 msg transmitted), return #bytes transmitted, else error code. */ return (ret == 1) ? count : ret; 
int i2c_master_recv(struct i2c_client *client, char *buf ,int count){	struct i2c_adapter *adap=client->adapter;	struct i2c_msg msg;	int ret;	if (client->adapter->algo->master_xfer) {		msg.addr   = client->addr;		msg.flags = client->flags & I2C_M_TEN;		msg.flags |= I2C_M_RD;		msg.len = count;		msg.buf = buf;		dev_dbg(&client->adapter->dev, "master_recv: reading %d bytes.\n",			count);			down(&adap->bus_lock);		ret = adap->algo->master_xfer(adap,&msg,1);		up(&adap->bus_lock);			dev_dbg(&client->adapter->dev, "master_recv: return:%d (count:%d, addr:0x%02x)\n",			ret, count, client->addr);			/* if everything went ok (i.e. 1 msg transmitted), return #bytes	 	* transmitted, else error code.	 	*/		return (ret == 1 )? count : ret;	} else {		dev_err(&client->adapter->dev, "I2C level transfers not supported\n");		return -ENOSYS;	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/815f55f280fb2781ba1c2a350516b73e55119c60/i2c-core.c/buggy/drivers/i2c/i2c-core.c