aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/fakephp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/fakephp.c')
-rw-r--r--drivers/pci/hotplug/fakephp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c
index 6151389fd903..17d10e2e8fb6 100644
--- a/drivers/pci/hotplug/fakephp.c
+++ b/drivers/pci/hotplug/fakephp.c
@@ -19,6 +19,7 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/pci.h> 20#include <linux/pci.h>
21#include <linux/device.h> 21#include <linux/device.h>
22#include <linux/slab.h>
22#include "../pci.h" 23#include "../pci.h"
23 24
24struct legacy_slot { 25struct legacy_slot {
@@ -73,7 +74,7 @@ static void legacy_release(struct kobject *kobj)
73} 74}
74 75
75static struct kobj_type legacy_ktype = { 76static struct kobj_type legacy_ktype = {
76 .sysfs_ops = &(struct sysfs_ops){ 77 .sysfs_ops = &(const struct sysfs_ops){
77 .store = legacy_store, .show = legacy_show 78 .store = legacy_store, .show = legacy_show
78 }, 79 },
79 .release = &legacy_release, 80 .release = &legacy_release,
@@ -134,7 +135,7 @@ static int __init init_legacy(void)
134 struct pci_dev *pdev = NULL; 135 struct pci_dev *pdev = NULL;
135 136
136 /* Add existing devices */ 137 /* Add existing devices */
137 while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) 138 for_each_pci_dev(pdev)
138 legacy_add_slot(pdev); 139 legacy_add_slot(pdev);
139 140
140 /* Be alerted of any new ones */ 141 /* Be alerted of any new ones */