diff options
| -rw-r--r-- | drivers/pci/hotplug/pciehp.h | 16 | ||||
| -rw-r--r-- | drivers/pci/hotplug/pciehp_core.c | 3 |
2 files changed, 6 insertions, 13 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 506e1d923a1f..af5d9f92e6d5 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
| @@ -29,13 +29,13 @@ | |||
| 29 | 29 | ||
| 30 | extern bool pciehp_poll_mode; | 30 | extern bool pciehp_poll_mode; |
| 31 | extern int pciehp_poll_time; | 31 | extern int pciehp_poll_time; |
| 32 | extern bool pciehp_debug; | ||
| 33 | 32 | ||
| 33 | /* | ||
| 34 | * Set CONFIG_DYNAMIC_DEBUG=y and boot with 'dyndbg="file pciehp* +p"' to | ||
| 35 | * enable debug messages. | ||
| 36 | */ | ||
| 34 | #define dbg(format, arg...) \ | 37 | #define dbg(format, arg...) \ |
| 35 | do { \ | 38 | pr_debug("%s: " format, MY_NAME, ## arg); |
| 36 | if (pciehp_debug) \ | ||
| 37 | printk(KERN_DEBUG "%s: " format, MY_NAME, ## arg); \ | ||
| 38 | } while (0) | ||
| 39 | #define err(format, arg...) \ | 39 | #define err(format, arg...) \ |
| 40 | printk(KERN_ERR "%s: " format, MY_NAME, ## arg) | 40 | printk(KERN_ERR "%s: " format, MY_NAME, ## arg) |
| 41 | #define info(format, arg...) \ | 41 | #define info(format, arg...) \ |
| @@ -44,11 +44,7 @@ do { \ | |||
| 44 | printk(KERN_WARNING "%s: " format, MY_NAME, ## arg) | 44 | printk(KERN_WARNING "%s: " format, MY_NAME, ## arg) |
| 45 | 45 | ||
| 46 | #define ctrl_dbg(ctrl, format, arg...) \ | 46 | #define ctrl_dbg(ctrl, format, arg...) \ |
| 47 | do { \ | 47 | dev_dbg(&ctrl->pcie->device, format, ## arg) |
| 48 | if (pciehp_debug) \ | ||
| 49 | dev_printk(KERN_DEBUG, &ctrl->pcie->device, \ | ||
| 50 | format, ## arg); \ | ||
| 51 | } while (0) | ||
| 52 | #define ctrl_err(ctrl, format, arg...) \ | 48 | #define ctrl_err(ctrl, format, arg...) \ |
| 53 | dev_err(&ctrl->pcie->device, format, ## arg) | 49 | dev_err(&ctrl->pcie->device, format, ## arg) |
| 54 | #define ctrl_info(ctrl, format, arg...) \ | 50 | #define ctrl_info(ctrl, format, arg...) \ |
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index fc5366b50e95..6ff204c435bf 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c | |||
| @@ -27,7 +27,6 @@ | |||
| 27 | #include "../pci.h" | 27 | #include "../pci.h" |
| 28 | 28 | ||
| 29 | /* Global variables */ | 29 | /* Global variables */ |
| 30 | bool pciehp_debug; | ||
| 31 | bool pciehp_poll_mode; | 30 | bool pciehp_poll_mode; |
| 32 | int pciehp_poll_time; | 31 | int pciehp_poll_time; |
| 33 | 32 | ||
| @@ -35,10 +34,8 @@ int pciehp_poll_time; | |||
| 35 | * not really modular, but the easiest way to keep compat with existing | 34 | * not really modular, but the easiest way to keep compat with existing |
| 36 | * bootargs behaviour is to continue using module_param here. | 35 | * bootargs behaviour is to continue using module_param here. |
| 37 | */ | 36 | */ |
| 38 | module_param(pciehp_debug, bool, 0644); | ||
| 39 | module_param(pciehp_poll_mode, bool, 0644); | 37 | module_param(pciehp_poll_mode, bool, 0644); |
| 40 | module_param(pciehp_poll_time, int, 0644); | 38 | module_param(pciehp_poll_time, int, 0644); |
| 41 | MODULE_PARM_DESC(pciehp_debug, "Debugging mode enabled or not"); | ||
| 42 | MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not"); | 39 | MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not"); |
| 43 | MODULE_PARM_DESC(pciehp_poll_time, "Polling mechanism frequency, in seconds"); | 40 | MODULE_PARM_DESC(pciehp_poll_time, "Polling mechanism frequency, in seconds"); |
| 44 | 41 | ||
