diff options
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/fakephp.c | 10 |
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 | ||
71 | static int debug; | 71 | static int debug; |
72 | static int dup_slots; | ||
72 | static LIST_HEAD(slot_list); | 73 | static LIST_HEAD(slot_list); |
73 | static struct workqueue_struct *dummyphp_wq; | 74 | static 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); | |||
375 | MODULE_LICENSE("GPL"); | 380 | MODULE_LICENSE("GPL"); |
376 | module_param(debug, bool, S_IRUGO | S_IWUSR); | 381 | module_param(debug, bool, S_IRUGO | S_IWUSR); |
377 | MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); | 382 | MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); |
378 | 383 | module_param(dup_slots, bool, S_IRUGO | S_IWUSR); | |
384 | MODULE_PARM_DESC(dup_slots, "Force duplicate slot names for debugging"); | ||