diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-06-13 12:52:13 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-06-25 19:05:19 -0400 |
commit | 34438ba602f9b8904aafe7559046ea68e99e88a0 (patch) | |
tree | f1cb1b000a091eaa1501a5c53a14143a0e7b4a5e /drivers/pci | |
parent | 531f254e5cdadb894f04ed27107cdb34c15817ea (diff) |
PCIE: port driver: use dev_printk when possible
Convert printks to use dev_printk().
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pcie/portdrv_core.c | 22 | ||||
-rw-r--r-- | drivers/pci/pcie/portdrv_pci.c | 5 |
2 files changed, 13 insertions, 14 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index fb0abfa508dc..890f0d2b370a 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c | |||
@@ -23,20 +23,20 @@ static int pcie_port_probe_service(struct device *dev) | |||
23 | { | 23 | { |
24 | struct pcie_device *pciedev; | 24 | struct pcie_device *pciedev; |
25 | struct pcie_port_service_driver *driver; | 25 | struct pcie_port_service_driver *driver; |
26 | int status = -ENODEV; | 26 | int status; |
27 | 27 | ||
28 | if (!dev || !dev->driver) | 28 | if (!dev || !dev->driver) |
29 | return status; | 29 | return -ENODEV; |
30 | 30 | ||
31 | driver = to_service_driver(dev->driver); | 31 | driver = to_service_driver(dev->driver); |
32 | if (!driver || !driver->probe) | 32 | if (!driver || !driver->probe) |
33 | return status; | 33 | return -ENODEV; |
34 | 34 | ||
35 | pciedev = to_pcie_device(dev); | 35 | pciedev = to_pcie_device(dev); |
36 | status = driver->probe(pciedev, driver->id_table); | 36 | status = driver->probe(pciedev, driver->id_table); |
37 | if (!status) { | 37 | if (!status) { |
38 | printk(KERN_DEBUG "Load service driver %s on pcie device %s\n", | 38 | dev_printk(KERN_DEBUG, dev, "service driver %s loaded\n", |
39 | driver->name, dev->bus_id); | 39 | driver->name); |
40 | get_device(dev); | 40 | get_device(dev); |
41 | } | 41 | } |
42 | return status; | 42 | return status; |
@@ -53,8 +53,8 @@ static int pcie_port_remove_service(struct device *dev) | |||
53 | pciedev = to_pcie_device(dev); | 53 | pciedev = to_pcie_device(dev); |
54 | driver = to_service_driver(dev->driver); | 54 | driver = to_service_driver(dev->driver); |
55 | if (driver && driver->remove) { | 55 | if (driver && driver->remove) { |
56 | printk(KERN_DEBUG "Unload service driver %s on pcie device %s\n", | 56 | dev_printk(KERN_DEBUG, dev, "unloading service driver %s\n", |
57 | driver->name, dev->bus_id); | 57 | driver->name); |
58 | driver->remove(pciedev); | 58 | driver->remove(pciedev); |
59 | put_device(dev); | 59 | put_device(dev); |
60 | } | 60 | } |
@@ -103,7 +103,7 @@ static int pcie_port_resume_service(struct device *dev) | |||
103 | */ | 103 | */ |
104 | static void release_pcie_device(struct device *dev) | 104 | static void release_pcie_device(struct device *dev) |
105 | { | 105 | { |
106 | printk(KERN_DEBUG "Free Port Service[%s]\n", dev->bus_id); | 106 | dev_printk(KERN_DEBUG, dev, "free port service\n"); |
107 | kfree(to_pcie_device(dev)); | 107 | kfree(to_pcie_device(dev)); |
108 | } | 108 | } |
109 | 109 | ||
@@ -150,7 +150,7 @@ static int assign_interrupt_mode(struct pci_dev *dev, int *vectors, int mask) | |||
150 | if (pos) { | 150 | if (pos) { |
151 | struct msix_entry msix_entries[PCIE_PORT_DEVICE_MAXSERVICES] = | 151 | struct msix_entry msix_entries[PCIE_PORT_DEVICE_MAXSERVICES] = |
152 | {{0, 0}, {0, 1}, {0, 2}, {0, 3}}; | 152 | {{0, 0}, {0, 1}, {0, 2}, {0, 3}}; |
153 | printk("%s Found MSIX capability\n", __func__); | 153 | dev_info(&dev->dev, "found MSI-X capability\n"); |
154 | status = pci_enable_msix(dev, msix_entries, nvec); | 154 | status = pci_enable_msix(dev, msix_entries, nvec); |
155 | if (!status) { | 155 | if (!status) { |
156 | int j = 0; | 156 | int j = 0; |
@@ -165,7 +165,7 @@ static int assign_interrupt_mode(struct pci_dev *dev, int *vectors, int mask) | |||
165 | if (status) { | 165 | if (status) { |
166 | pos = pci_find_capability(dev, PCI_CAP_ID_MSI); | 166 | pos = pci_find_capability(dev, PCI_CAP_ID_MSI); |
167 | if (pos) { | 167 | if (pos) { |
168 | printk("%s Found MSI capability\n", __func__); | 168 | dev_info(&dev->dev, "found MSI capability\n"); |
169 | status = pci_enable_msi(dev); | 169 | status = pci_enable_msi(dev); |
170 | if (!status) { | 170 | if (!status) { |
171 | interrupt_mode = PCIE_PORT_MSI_MODE; | 171 | interrupt_mode = PCIE_PORT_MSI_MODE; |
@@ -252,7 +252,7 @@ static struct pcie_device* alloc_pcie_device(struct pci_dev *parent, | |||
252 | return NULL; | 252 | return NULL; |
253 | 253 | ||
254 | pcie_device_init(parent, device, port_type, service_type, irq,irq_mode); | 254 | pcie_device_init(parent, device, port_type, service_type, irq,irq_mode); |
255 | printk(KERN_DEBUG "Allocate Port Service[%s]\n", device->device.bus_id); | 255 | dev_printk(KERN_DEBUG, &device->device, "allocate port service\n"); |
256 | return device; | 256 | return device; |
257 | } | 257 | } |
258 | 258 | ||
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 51d163238d93..367c9c20000d 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
@@ -91,9 +91,8 @@ static int __devinit pcie_portdrv_probe (struct pci_dev *dev, | |||
91 | 91 | ||
92 | pci_set_master(dev); | 92 | pci_set_master(dev); |
93 | if (!dev->irq && dev->pin) { | 93 | if (!dev->irq && dev->pin) { |
94 | printk(KERN_WARNING | 94 | dev_warn(&dev->dev, "device [%04x/%04x] has invalid IRQ; " |
95 | "%s->Dev[%04x:%04x] has invalid IRQ. Check vendor BIOS\n", | 95 | "check vendor BIOS\n", dev->vendor, dev->device); |
96 | __func__, dev->vendor, dev->device); | ||
97 | } | 96 | } |
98 | if (pcie_port_device_register(dev)) { | 97 | if (pcie_port_device_register(dev)) { |
99 | pci_disable_device(dev); | 98 | pci_disable_device(dev); |