diff options
Diffstat (limited to 'drivers/pci/proc.c')
-rw-r--r-- | drivers/pci/proc.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 1ee8927a0635..7ac035af39f0 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c | |||
@@ -435,25 +435,12 @@ int pci_proc_detach_bus(struct pci_bus *bus) | |||
435 | return 0; | 435 | return 0; |
436 | } | 436 | } |
437 | 437 | ||
438 | static int proc_bus_pci_dev_open(struct inode *inode, struct file *file) | ||
439 | { | ||
440 | return seq_open(file, &proc_bus_pci_devices_op); | ||
441 | } | ||
442 | |||
443 | static const struct file_operations proc_bus_pci_dev_operations = { | ||
444 | .owner = THIS_MODULE, | ||
445 | .open = proc_bus_pci_dev_open, | ||
446 | .read = seq_read, | ||
447 | .llseek = seq_lseek, | ||
448 | .release = seq_release, | ||
449 | }; | ||
450 | |||
451 | static int __init pci_proc_init(void) | 438 | static int __init pci_proc_init(void) |
452 | { | 439 | { |
453 | struct pci_dev *dev = NULL; | 440 | struct pci_dev *dev = NULL; |
454 | proc_bus_pci_dir = proc_mkdir("bus/pci", NULL); | 441 | proc_bus_pci_dir = proc_mkdir("bus/pci", NULL); |
455 | proc_create("devices", 0, proc_bus_pci_dir, | 442 | proc_create_seq("devices", 0, proc_bus_pci_dir, |
456 | &proc_bus_pci_dev_operations); | 443 | &proc_bus_pci_devices_op); |
457 | proc_initialized = 1; | 444 | proc_initialized = 1; |
458 | for_each_pci_dev(dev) | 445 | for_each_pci_dev(dev) |
459 | pci_proc_attach_device(dev); | 446 | pci_proc_attach_device(dev); |