pci_write_config_byte(dev, pos, val); 
pci_user_write_config_byte(dev, pos, val); 
proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos){	const struct inode *ino = file->f_dentry->d_inode;	const struct proc_dir_entry *dp = PDE(ino);	struct pci_dev *dev = dp->data;	int pos = *ppos;	int size = dev->cfg_size;	int cnt;	if (pos >= size)		return 0;	if (nbytes >= size)		nbytes = size;	if (pos + nbytes > size)		nbytes = size - pos;	cnt = nbytes;	if (!access_ok(VERIFY_READ, buf, cnt))		return -EINVAL;	if ((pos & 1) && cnt) {		unsigned char val;		__get_user(val, buf);		pci_write_config_byte(dev, pos, val);		buf++;		pos++;		cnt--;	}	if ((pos & 3) && cnt > 2) {		unsigned short val;		__get_user(val, (unsigned short __user *) buf);		pci_write_config_word(dev, pos, le16_to_cpu(val));		buf += 2;		pos += 2;		cnt -= 2;	}	while (cnt >= 4) {		unsigned int val;		__get_user(val, (unsigned int __user *) buf);		pci_write_config_dword(dev, pos, le32_to_cpu(val));		buf += 4;		pos += 4;		cnt -= 4;	}	if (cnt >= 2) {		unsigned short val;		__get_user(val, (unsigned short __user *) buf);		pci_write_config_word(dev, pos, le16_to_cpu(val));		buf += 2;		pos += 2;		cnt -= 2;	}	if (cnt) {		unsigned char val;		__get_user(val, buf);		pci_write_config_byte(dev, pos, val);		buf++;		pos++;		cnt--;	}	*ppos = pos;	return nbytes;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e04b0ea2e0f9c1bb0d874db4493fc7f7a623116b/proc.c/buggy/drivers/pci/proc.c