ssize_t tpm_write(struct file * file, const char __user * buf, 
ssize_t tpm_write(struct file *file, const char __user *buf, 
ssize_t tpm_write(struct file * file, const char __user * buf,		  size_t size, loff_t * off){	struct tpm_chip *chip = file->private_data;	int in_size = size, out_size;	/* cannot perform a write until the read has cleared	   either via tpm_read or a user_read_timer timeout */	while (atomic_read(&chip->data_pending) != 0)		msleep(TPM_TIMEOUT);	down(&chip->buffer_mutex);	if (in_size > TPM_BUFSIZE)		in_size = TPM_BUFSIZE;	if (copy_from_user	    (chip->data_buffer, (void __user *) buf, in_size)) {		up(&chip->buffer_mutex);		return -EFAULT;	}	/* atomic tpm command send and result receive */	out_size = tpm_transmit(chip, chip->data_buffer, TPM_BUFSIZE);	atomic_set(&chip->data_pending, out_size);	up(&chip->buffer_mutex);	/* Set a timeout by which the reader must come claim the result */	mod_timer(&chip->user_read_timer, jiffies + (60 * HZ));	return in_size;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b888c87b7498557d1dbb9de3d4b8402b1bb89193/tpm.c/clean/drivers/char/tpm/tpm.c