struct ds1337_data *data = i2c_get_clientdata(client); 
static int ds1337_set_datetime(struct i2c_client *client, struct rtc_time *dt){	struct ds1337_data *data = i2c_get_clientdata(client);	int result;	u8 buf[8];	u8 val;	struct i2c_msg msg[1];	if (!dt) {		dev_dbg(&client->adapter->dev, "%s: EINVAL: dt=NULL\n",			__FUNCTION__);		return -EINVAL;	}	dev_dbg(&client->adapter->dev, "%s: secs=%d, mins=%d, hours=%d, "		"mday=%d, mon=%d, year=%d, wday=%d\n", __FUNCTION__,		dt->tm_sec, dt->tm_min, dt->tm_hour,		dt->tm_mday, dt->tm_mon, dt->tm_year, dt->tm_wday);	buf[0] = 0;		/* reg offset */	buf[1] = BIN2BCD(dt->tm_sec);	buf[2] = BIN2BCD(dt->tm_min);	buf[3] = BIN2BCD(dt->tm_hour) | (1 << 6);	buf[4] = BIN2BCD(dt->tm_wday) + 1;	buf[5] = BIN2BCD(dt->tm_mday);	buf[6] = BIN2BCD(dt->tm_mon);	if (dt->tm_year >= 2000) {		val = dt->tm_year - 2000;		buf[6] |= (1 << 7);	} else {		val = dt->tm_year - 1900;	}	buf[7] = BIN2BCD(val);	msg[0].addr = client->addr;	msg[0].flags = 0;	msg[0].len = sizeof(buf);	msg[0].buf = &buf[0];	result = i2c_transfer(client->adapter, msg, 1);	if (result < 0) {		dev_err(&client->adapter->dev, "ds1337[%d]: error "			"writing data! %d\n", data->id, result);		result = -EIO;	} else {		result = 0;	}	return result;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d01b79d0613ebb6810bb48baf6e53e9319701fea/ds1337.c/buggy/drivers/i2c/chips/ds1337.c