diff options
author | Taku Izumi <izumi.taku@jp.fujitsu.com> | 2008-10-22 22:52:12 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-10-23 19:11:50 -0400 |
commit | f98ca311f3a32e2adc229fecd6bf732db07fcca3 (patch) | |
tree | 70605c5063f72f93a08d350b0fcb66fd359b7996 /drivers/pci/hotplug/shpchp_pci.c | |
parent | 388c8c16abafc2e74dff173b5de9ee519ea8d32f (diff) |
PCI hotplug: shpchp: replace printk with dev_printk
This patch replaces printks within shpchp 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/shpchp_pci.c')
-rw-r--r-- | drivers/pci/hotplug/shpchp_pci.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c index 3fc4ec0eea0b..faecbfaa64f0 100644 --- a/drivers/pci/hotplug/shpchp_pci.c +++ b/drivers/pci/hotplug/shpchp_pci.c | |||
@@ -101,18 +101,20 @@ int __ref shpchp_configure_device(struct slot *p_slot) | |||
101 | struct pci_dev *dev; | 101 | struct pci_dev *dev; |
102 | struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate; | 102 | struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate; |
103 | int num, fn; | 103 | int num, fn; |
104 | struct controller *ctrl = p_slot->ctrl; | ||
104 | 105 | ||
105 | dev = pci_get_slot(parent, PCI_DEVFN(p_slot->device, 0)); | 106 | dev = pci_get_slot(parent, PCI_DEVFN(p_slot->device, 0)); |
106 | if (dev) { | 107 | if (dev) { |
107 | err("Device %s already exists at %x:%x, cannot hot-add\n", | 108 | ctrl_err(ctrl, |
108 | pci_name(dev), p_slot->bus, p_slot->device); | 109 | "Device %s already exists at %x:%x, cannot hot-add\n", |
110 | pci_name(dev), p_slot->bus, p_slot->device); | ||
109 | pci_dev_put(dev); | 111 | pci_dev_put(dev); |
110 | return -EINVAL; | 112 | return -EINVAL; |
111 | } | 113 | } |
112 | 114 | ||
113 | num = pci_scan_slot(parent, PCI_DEVFN(p_slot->device, 0)); | 115 | num = pci_scan_slot(parent, PCI_DEVFN(p_slot->device, 0)); |
114 | if (num == 0) { | 116 | if (num == 0) { |
115 | err("No new device found\n"); | 117 | ctrl_err(ctrl, "No new device found\n"); |
116 | return -ENODEV; | 118 | return -ENODEV; |
117 | } | 119 | } |
118 | 120 | ||
@@ -121,8 +123,8 @@ int __ref shpchp_configure_device(struct slot *p_slot) | |||
121 | if (!dev) | 123 | if (!dev) |
122 | continue; | 124 | continue; |
123 | if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { | 125 | if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { |
124 | err("Cannot hot-add display device %s\n", | 126 | ctrl_err(ctrl, "Cannot hot-add display device %s\n", |
125 | pci_name(dev)); | 127 | pci_name(dev)); |
126 | pci_dev_put(dev); | 128 | pci_dev_put(dev); |
127 | continue; | 129 | continue; |
128 | } | 130 | } |
@@ -138,14 +140,15 @@ int __ref shpchp_configure_device(struct slot *p_slot) | |||
138 | break; | 140 | break; |
139 | } | 141 | } |
140 | if (busnr >= end) { | 142 | if (busnr >= end) { |
141 | err("No free bus for hot-added bridge\n"); | 143 | ctrl_err(ctrl, |
144 | "No free bus for hot-added bridge\n"); | ||
142 | pci_dev_put(dev); | 145 | pci_dev_put(dev); |
143 | continue; | 146 | continue; |
144 | } | 147 | } |
145 | child = pci_add_new_bus(parent, dev, busnr); | 148 | child = pci_add_new_bus(parent, dev, busnr); |
146 | if (!child) { | 149 | if (!child) { |
147 | err("Cannot add new bus for %s\n", | 150 | ctrl_err(ctrl, "Cannot add new bus for %s\n", |
148 | pci_name(dev)); | 151 | pci_name(dev)); |
149 | pci_dev_put(dev); | 152 | pci_dev_put(dev); |
150 | continue; | 153 | continue; |
151 | } | 154 | } |
@@ -168,8 +171,10 @@ int shpchp_unconfigure_device(struct slot *p_slot) | |||
168 | int j; | 171 | int j; |
169 | u8 bctl = 0; | 172 | u8 bctl = 0; |
170 | struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate; | 173 | struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate; |
174 | struct controller *ctrl = p_slot->ctrl; | ||
171 | 175 | ||
172 | dbg("%s: bus/dev = %x/%x\n", __func__, p_slot->bus, p_slot->device); | 176 | ctrl_dbg(ctrl, "%s: bus/dev = %x/%x\n", |
177 | __func__, p_slot->bus, p_slot->device); | ||
173 | 178 | ||
174 | for (j=0; j<8 ; j++) { | 179 | for (j=0; j<8 ; j++) { |
175 | struct pci_dev* temp = pci_get_slot(parent, | 180 | struct pci_dev* temp = pci_get_slot(parent, |
@@ -177,16 +182,17 @@ int shpchp_unconfigure_device(struct slot *p_slot) | |||
177 | if (!temp) | 182 | if (!temp) |
178 | continue; | 183 | continue; |
179 | if ((temp->class >> 16) == PCI_BASE_CLASS_DISPLAY) { | 184 | if ((temp->class >> 16) == PCI_BASE_CLASS_DISPLAY) { |
180 | err("Cannot remove display device %s\n", | 185 | ctrl_err(ctrl, "Cannot remove display device %s\n", |
181 | pci_name(temp)); | 186 | pci_name(temp)); |
182 | pci_dev_put(temp); | 187 | pci_dev_put(temp); |
183 | continue; | 188 | continue; |
184 | } | 189 | } |
185 | if (temp->hdr_type == PCI_HEADER_TYPE_BRIDGE) { | 190 | if (temp->hdr_type == PCI_HEADER_TYPE_BRIDGE) { |
186 | pci_read_config_byte(temp, PCI_BRIDGE_CONTROL, &bctl); | 191 | pci_read_config_byte(temp, PCI_BRIDGE_CONTROL, &bctl); |
187 | if (bctl & PCI_BRIDGE_CTL_VGA) { | 192 | if (bctl & PCI_BRIDGE_CTL_VGA) { |
188 | err("Cannot remove display device %s\n", | 193 | ctrl_err(ctrl, |
189 | pci_name(temp)); | 194 | "Cannot remove display device %s\n", |
195 | pci_name(temp)); | ||
190 | pci_dev_put(temp); | 196 | pci_dev_put(temp); |
191 | continue; | 197 | continue; |
192 | } | 198 | } |