aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp_hpc.c
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2008-08-22 04:16:48 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-10-20 13:53:47 -0400
commitf7a10e32a1a7ae240fa3925c5727d224eba3e31d (patch)
treeb10ee68a20f16ca6267eb1a7a004277bd50bce9b /drivers/pci/hotplug/pciehp_hpc.c
parentc01156061bdd5976397dfb173f8c70ae351a6cb6 (diff)
PCI: pciehp: fix irq initialization
Current pciehp driver gets irq number from pci_dev->irq. But because pciehp driver is a pci express port service driver, it should get irq number from pcie_device->irq. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_hpc.c')
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 9d934ddee95..5a5c08f12af 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -223,7 +223,7 @@ static void start_int_poll_timer(struct controller *ctrl, int sec)
223 223
224static inline int pciehp_request_irq(struct controller *ctrl) 224static inline int pciehp_request_irq(struct controller *ctrl)
225{ 225{
226 int retval, irq = ctrl->pci_dev->irq; 226 int retval, irq = ctrl->pcie->irq;
227 227
228 /* Install interrupt polling timer. Start with 10 sec delay */ 228 /* Install interrupt polling timer. Start with 10 sec delay */
229 if (pciehp_poll_mode) { 229 if (pciehp_poll_mode) {
@@ -244,7 +244,7 @@ static inline void pciehp_free_irq(struct controller *ctrl)
244 if (pciehp_poll_mode) 244 if (pciehp_poll_mode)
245 del_timer_sync(&ctrl->poll_timer); 245 del_timer_sync(&ctrl->poll_timer);
246 else 246 else
247 free_irq(ctrl->pci_dev->irq, ctrl); 247 free_irq(ctrl->pcie->irq, ctrl);
248} 248}
249 249
250static int pcie_poll_cmd(struct controller *ctrl) 250static int pcie_poll_cmd(struct controller *ctrl)
@@ -1114,6 +1114,7 @@ struct controller *pcie_init(struct pcie_device *dev)
1114 } 1114 }
1115 INIT_LIST_HEAD(&ctrl->slot_list); 1115 INIT_LIST_HEAD(&ctrl->slot_list);
1116 1116
1117 ctrl->pcie = dev;
1117 ctrl->pci_dev = pdev; 1118 ctrl->pci_dev = pdev;
1118 ctrl->cap_base = pci_find_capability(pdev, PCI_CAP_ID_EXP); 1119 ctrl->cap_base = pci_find_capability(pdev, PCI_CAP_ID_EXP);
1119 if (!ctrl->cap_base) { 1120 if (!ctrl->cap_base) {