aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci/hotplug/pciehp.h
diff options
context:
space:
mode:
authorTaku Izumi <izumi.taku@jp.fujitsu.com>2008-09-05 12:11:26 +0900
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-10-20 10:53:49 -0700
commit7f2feec140f1f1e4f701e013a2bf8284a9ec2a3c (patch)
tree50a0323a4c3b74c8a428470e6b086ed8bc0b19dd /drivers/pci/hotplug/pciehp.h
parentPCI: pciehp: change name tag of "hpdriver_portdrv" variable (diff)
downloadwireguard-linux-7f2feec140f1f1e4f701e013a2bf8284a9ec2a3c.tar.xz
wireguard-linux-7f2feec140f1f1e4f701e013a2bf8284a9ec2a3c.zip
PCI: pciehp: replace printk with dev_printk
This patch replaces printks within pciehp module with dev_printks. Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug/pciehp.h')
-rw-r--r--drivers/pci/hotplug/pciehp.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index 217427a0ead9..c367978bd7fe 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -57,6 +57,19 @@ extern struct workqueue_struct *pciehp_wq;
#define warn(format, arg...) \
printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)
+#define ctrl_dbg(ctrl, format, arg...) \
+ do { \
+ if (pciehp_debug) \
+ dev_printk(, &ctrl->pcie->device, \
+ format, ## arg); \
+ } while (0)
+#define ctrl_err(ctrl, format, arg...) \
+ dev_err(&ctrl->pcie->device, format, ## arg)
+#define ctrl_info(ctrl, format, arg...) \
+ dev_info(&ctrl->pcie->device, format, ## arg)
+#define ctrl_warn(ctrl, format, arg...) \
+ dev_warn(&ctrl->pcie->device, format, ## arg)
+
#define SLOT_NAME_SIZE 10
struct slot {
u8 bus;
@@ -171,7 +184,7 @@ static inline struct slot *pciehp_find_slot(struct controller *ctrl, u8 device)
return slot;
}
- err("%s: slot (device=0x%x) not found\n", __func__, device);
+ ctrl_err(ctrl, "%s: slot (device=0x%x) not found\n", __func__, device);
return NULL;
}