From 4c78b4cfd1c430e1d2d0b243281cfb3f19f71ff3 Mon Sep 17 00:00:00 2001 From: Alex Chiang Date: Mon, 20 Oct 2008 17:42:03 -0600 Subject: [PATCH] --- yaml --- r: 117225 b: refs/heads/master c: 0b8b0dca9aad94878adaf4520f3f12bf9813f329 h: refs/heads/master i: 117223: 8d2570c95cd331f7cbb0ee4bfb4ac0a9d519dc62 v: v3 --- [refs] | 2 +- trunk/drivers/pci/hotplug/fakephp.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 7d1445caf627..444f5ad90998 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 58319b802a614f10f1b5238fbde7a4b2e9a60069 +refs/heads/master: 0b8b0dca9aad94878adaf4520f3f12bf9813f329 diff --git a/trunk/drivers/pci/hotplug/fakephp.c b/trunk/drivers/pci/hotplug/fakephp.c index 24dcbf13e98b..3a2637a00934 100644 --- a/trunk/drivers/pci/hotplug/fakephp.c +++ b/trunk/drivers/pci/hotplug/fakephp.c @@ -69,6 +69,7 @@ struct dummy_slot { }; static int debug; +static int dup_slots; static LIST_HEAD(slot_list); static struct workqueue_struct *dummyphp_wq; @@ -121,7 +122,11 @@ static int add_slot(struct pci_dev *dev) if (!dslot) goto error_info; - snprintf(name, SLOT_NAME_SIZE, "fake%d", count++); + if (dup_slots) + snprintf(name, SLOT_NAME_SIZE, "fake"); + else + snprintf(name, SLOT_NAME_SIZE, "fake%d", count++); + dbg("slot->name = %s\n", name); slot->ops = &dummy_hotplug_slot_ops; slot->release = &dummy_release; slot->private = dslot; @@ -375,4 +380,5 @@ MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); module_param(debug, bool, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); - +module_param(dup_slots, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(dup_slots, "Force duplicate slot names for debugging");