aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/fakephp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c
index 24dcbf13e98b..3a2637a00934 100644
--- a/drivers/pci/hotplug/fakephp.c
+++ b/drivers/pci/hotplug/fakephp.c
@@ -69,6 +69,7 @@ struct dummy_slot {
69}; 69};
70 70
71static int debug; 71static int debug;
72static int dup_slots;
72static LIST_HEAD(slot_list); 73static LIST_HEAD(slot_list);
73static struct workqueue_struct *dummyphp_wq; 74static struct workqueue_struct *dummyphp_wq;
74 75
@@ -121,7 +122,11 @@ static int add_slot(struct pci_dev *dev)
121 if (!dslot) 122 if (!dslot)
122 goto error_info; 123 goto error_info;
123 124
124 snprintf(name, SLOT_NAME_SIZE, "fake%d", count++); 125 if (dup_slots)
126 snprintf(name, SLOT_NAME_SIZE, "fake");
127 else
128 snprintf(name, SLOT_NAME_SIZE, "fake%d", count++);
129 dbg("slot->name = %s\n", name);
125 slot->ops = &dummy_hotplug_slot_ops; 130 slot->ops = &dummy_hotplug_slot_ops;
126 slot->release = &dummy_release; 131 slot->release = &dummy_release;
127 slot->private = dslot; 132 slot->private = dslot;
@@ -375,4 +380,5 @@ MODULE_DESCRIPTION(DRIVER_DESC);
375MODULE_LICENSE("GPL"); 380MODULE_LICENSE("GPL");
376module_param(debug, bool, S_IRUGO | S_IWUSR); 381module_param(debug, bool, S_IRUGO | S_IWUSR);
377MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); 382MODULE_PARM_DESC(debug, "Debugging mode enabled or not");
378 383module_param(dup_slots, bool, S_IRUGO | S_IWUSR);
384MODULE_PARM_DESC(dup_slots, "Force duplicate slot names for debugging");