diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/shpchp_core.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c index 43816d4b3c43..1648076600fc 100644 --- a/drivers/pci/hotplug/shpchp_core.c +++ b/drivers/pci/hotplug/shpchp_core.c | |||
@@ -39,6 +39,7 @@ | |||
39 | int shpchp_debug; | 39 | int shpchp_debug; |
40 | int shpchp_poll_mode; | 40 | int shpchp_poll_mode; |
41 | int shpchp_poll_time; | 41 | int shpchp_poll_time; |
42 | int shpchp_slot_with_bus; | ||
42 | struct workqueue_struct *shpchp_wq; | 43 | struct workqueue_struct *shpchp_wq; |
43 | 44 | ||
44 | #define DRIVER_VERSION "0.4" | 45 | #define DRIVER_VERSION "0.4" |
@@ -52,9 +53,11 @@ MODULE_LICENSE("GPL"); | |||
52 | module_param(shpchp_debug, bool, 0644); | 53 | module_param(shpchp_debug, bool, 0644); |
53 | module_param(shpchp_poll_mode, bool, 0644); | 54 | module_param(shpchp_poll_mode, bool, 0644); |
54 | module_param(shpchp_poll_time, int, 0644); | 55 | module_param(shpchp_poll_time, int, 0644); |
56 | module_param(shpchp_slot_with_bus, bool, 0644); | ||
55 | MODULE_PARM_DESC(shpchp_debug, "Debugging mode enabled or not"); | 57 | MODULE_PARM_DESC(shpchp_debug, "Debugging mode enabled or not"); |
56 | MODULE_PARM_DESC(shpchp_poll_mode, "Using polling mechanism for hot-plug events or not"); | 58 | MODULE_PARM_DESC(shpchp_poll_mode, "Using polling mechanism for hot-plug events or not"); |
57 | MODULE_PARM_DESC(shpchp_poll_time, "Polling mechanism frequency, in seconds"); | 59 | MODULE_PARM_DESC(shpchp_poll_time, "Polling mechanism frequency, in seconds"); |
60 | MODULE_PARM_DESC(shpchp_slot_with_bus, "Use bus number in the slot name"); | ||
58 | 61 | ||
59 | #define SHPC_MODULE_NAME "shpchp" | 62 | #define SHPC_MODULE_NAME "shpchp" |
60 | 63 | ||
@@ -100,8 +103,12 @@ static void release_slot(struct hotplug_slot *hotplug_slot) | |||
100 | 103 | ||
101 | static void make_slot_name(struct slot *slot) | 104 | static void make_slot_name(struct slot *slot) |
102 | { | 105 | { |
103 | snprintf(slot->hotplug_slot->name, SLOT_NAME_SIZE, "%04d_%04d", | 106 | if (shpchp_slot_with_bus) |
104 | slot->bus, slot->number); | 107 | snprintf(slot->hotplug_slot->name, SLOT_NAME_SIZE, "%04d_%04d", |
108 | slot->bus, slot->number); | ||
109 | else | ||
110 | snprintf(slot->hotplug_slot->name, SLOT_NAME_SIZE, "%d", | ||
111 | slot->number); | ||
105 | } | 112 | } |
106 | 113 | ||
107 | static int init_slots(struct controller *ctrl) | 114 | static int init_slots(struct controller *ctrl) |