diff options
Diffstat (limited to 'drivers/pci/proc.c')
-rw-r--r-- | drivers/pci/proc.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 46d1378f2e9e..3f155e78513f 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c | |||
@@ -17,15 +17,14 @@ | |||
17 | 17 | ||
18 | static int proc_initialized; /* = 0 */ | 18 | static int proc_initialized; /* = 0 */ |
19 | 19 | ||
20 | static loff_t | 20 | static loff_t proc_bus_pci_lseek(struct file *file, loff_t off, int whence) |
21 | proc_bus_pci_lseek(struct file *file, loff_t off, int whence) | ||
22 | { | 21 | { |
23 | struct pci_dev *dev = PDE_DATA(file_inode(file)); | 22 | struct pci_dev *dev = PDE_DATA(file_inode(file)); |
24 | return fixed_size_llseek(file, off, whence, dev->cfg_size); | 23 | return fixed_size_llseek(file, off, whence, dev->cfg_size); |
25 | } | 24 | } |
26 | 25 | ||
27 | static ssize_t | 26 | static ssize_t proc_bus_pci_read(struct file *file, char __user *buf, |
28 | proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) | 27 | size_t nbytes, loff_t *ppos) |
29 | { | 28 | { |
30 | struct pci_dev *dev = PDE_DATA(file_inode(file)); | 29 | struct pci_dev *dev = PDE_DATA(file_inode(file)); |
31 | unsigned int pos = *ppos; | 30 | unsigned int pos = *ppos; |
@@ -108,8 +107,8 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp | |||
108 | return nbytes; | 107 | return nbytes; |
109 | } | 108 | } |
110 | 109 | ||
111 | static ssize_t | 110 | static ssize_t proc_bus_pci_write(struct file *file, const char __user *buf, |
112 | proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) | 111 | size_t nbytes, loff_t *ppos) |
113 | { | 112 | { |
114 | struct inode *ino = file_inode(file); | 113 | struct inode *ino = file_inode(file); |
115 | struct pci_dev *dev = PDE_DATA(ino); | 114 | struct pci_dev *dev = PDE_DATA(ino); |
@@ -413,7 +412,7 @@ int pci_proc_detach_device(struct pci_dev *dev) | |||
413 | return 0; | 412 | return 0; |
414 | } | 413 | } |
415 | 414 | ||
416 | int pci_proc_detach_bus(struct pci_bus* bus) | 415 | int pci_proc_detach_bus(struct pci_bus *bus) |
417 | { | 416 | { |
418 | proc_remove(bus->procdir); | 417 | proc_remove(bus->procdir); |
419 | return 0; | 418 | return 0; |
@@ -423,6 +422,7 @@ static int proc_bus_pci_dev_open(struct inode *inode, struct file *file) | |||
423 | { | 422 | { |
424 | return seq_open(file, &proc_bus_pci_devices_op); | 423 | return seq_open(file, &proc_bus_pci_devices_op); |
425 | } | 424 | } |
425 | |||
426 | static const struct file_operations proc_bus_pci_dev_operations = { | 426 | static const struct file_operations proc_bus_pci_dev_operations = { |
427 | .owner = THIS_MODULE, | 427 | .owner = THIS_MODULE, |
428 | .open = proc_bus_pci_dev_open, | 428 | .open = proc_bus_pci_dev_open, |
@@ -443,6 +443,4 @@ static int __init pci_proc_init(void) | |||
443 | 443 | ||
444 | return 0; | 444 | return 0; |
445 | } | 445 | } |
446 | |||
447 | device_initcall(pci_proc_init); | 446 | device_initcall(pci_proc_init); |
448 | |||