u8 match[9] = {W1_MATCH_ROM, }; 
static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, size_t count){	struct w1_slave *sl = kobj_to_w1_slave(kobj);	struct w1_master *dev = sl->master;	u8 rom[9], crc, verdict;	int i, max_trying = 10;	atomic_inc(&sl->refcnt);	smp_mb__after_atomic_inc();	if (down_interruptible(&sl->master->mutex)) {		count = 0;		goto out_dec;	}	if (off > W1_SLAVE_DATA_SIZE) {		count = 0;		goto out;	}	if (off + count > W1_SLAVE_DATA_SIZE) {		count = 0;		goto out;	}	memset(buf, 0, count);	memset(rom, 0, sizeof(rom));	count = 0;	verdict = 0;	crc = 0;	while (max_trying--) {		if (!w1_reset_bus (dev)) {			int count = 0;			u8 match[9] = {W1_MATCH_ROM, };			unsigned int tm = 750;			memcpy(&match[1], (u64 *) & sl->reg_num, 8);			w1_write_block(dev, match, 9);			w1_write_8(dev, W1_CONVERT_TEMP);			while (tm) {				tm = msleep_interruptible(tm);				if (signal_pending(current))					flush_signals(current);			}			if (!w1_reset_bus (dev)) {				w1_write_block(dev, match, 9);				w1_write_8(dev, W1_READ_SCRATCHPAD);				if ((count = w1_read_block(dev, rom, 9)) != 9) {					dev_warn(&dev->dev, "w1_read_block() returned %d instead of 9.\n", count);				}				crc = w1_calc_crc8(rom, 8);				if (rom[8] == crc && rom[0])					verdict = 1;			}		}		if (!w1_therm_check_rom(rom))			break;	}	for (i = 0; i < 9; ++i)		count += sprintf(buf + count, "%02x ", rom[i]);	count += sprintf(buf + count, ": crc=%02x %s\n",			   crc, (verdict) ? "YES" : "NO");	if (verdict)		memcpy(sl->rom, rom, sizeof(sl->rom));	else		dev_warn(&dev->dev, "18S20 doesn't respond to CONVERT_TEMP.\n");	for (i = 0; i < 9; ++i)		count += sprintf(buf + count, "%02x ", sl->rom[i]);		count += sprintf(buf + count, "t=%d\n", w1_convert_temp(rom, sl->family->fid));out:	up(&dev->mutex);out_dec:	smp_mb__before_atomic_inc();	atomic_dec(&sl->refcnt);	return count;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/ea7d8f65c865ebfa1d7cd67c360a87333ff013c1/w1_therm.c/clean/drivers/w1/w1_therm.c