aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2006-12-21 20:01:05 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 18:50:04 -0500
commita8c2b635979823043ea7766dea1d9371773b4d8e (patch)
treef9df75e8ff6623362c94359982d160fc811d919e /drivers/pci/hotplug
parent48fe39151727db350347e1dba09d71c8ca24207a (diff)
pciehp: remove unused pci_bus from struct controller
This patch removes unused pci_bus member from struct controller. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/pciehp.h1
-rw-r--r--drivers/pci/hotplug/pciehp_core.c14
2 files changed, 2 insertions, 13 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index 202e4967a941..b505515a07ae 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -78,7 +78,6 @@ struct controller {
78 int num_slots; /* Number of slots on ctlr */ 78 int num_slots; /* Number of slots on ctlr */
79 int slot_num_inc; /* 1 or -1 */ 79 int slot_num_inc; /* 1 or -1 */
80 struct pci_dev *pci_dev; 80 struct pci_dev *pci_dev;
81 struct pci_bus *pci_bus;
82 struct list_head slot_list; 81 struct list_head slot_list;
83 struct event_info event_queue[MAX_EVENTS]; 82 struct event_info event_queue[MAX_EVENTS];
84 struct slot *slot; 83 struct slot *slot;
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index a315685b2d37..b617613381d6 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -346,13 +346,6 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
346 346
347 pci_set_drvdata(pdev, ctrl); 347 pci_set_drvdata(pdev, ctrl);
348 348
349 ctrl->pci_bus = kmalloc(sizeof(*ctrl->pci_bus), GFP_KERNEL);
350 if (!ctrl->pci_bus) {
351 err("%s: out of memory\n", __FUNCTION__);
352 rc = -ENOMEM;
353 goto err_out_unmap_mmio_region;
354 }
355 memcpy (ctrl->pci_bus, pdev->bus, sizeof (*ctrl->pci_bus));
356 ctrl->bus = pdev->bus->number; /* ctrl bus */ 349 ctrl->bus = pdev->bus->number; /* ctrl bus */
357 ctrl->slot_bus = pdev->subordinate->number; /* bus controlled by this HPC */ 350 ctrl->slot_bus = pdev->subordinate->number; /* bus controlled by this HPC */
358 351
@@ -365,7 +358,7 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
365 rc = init_slots(ctrl); 358 rc = init_slots(ctrl);
366 if (rc) { 359 if (rc) {
367 err(msg_initialization_err, 6); 360 err(msg_initialization_err, 6);
368 goto err_out_free_ctrl_slot; 361 goto err_out_release_ctlr;
369 } 362 }
370 363
371 t_slot = pciehp_find_slot(ctrl, ctrl->slot_device_offset); 364 t_slot = pciehp_find_slot(ctrl, ctrl->slot_device_offset);
@@ -404,8 +397,7 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
404 397
405err_out_free_ctrl_slot: 398err_out_free_ctrl_slot:
406 cleanup_slots(ctrl); 399 cleanup_slots(ctrl);
407 kfree(ctrl->pci_bus); 400err_out_release_ctlr:
408err_out_unmap_mmio_region:
409 ctrl->hpc_ops->release_ctlr(ctrl); 401 ctrl->hpc_ops->release_ctlr(ctrl);
410err_out_free_ctrl: 402err_out_free_ctrl:
411 kfree(ctrl); 403 kfree(ctrl);
@@ -439,8 +431,6 @@ static void __exit unload_pciehpd(void)
439 while (ctrl) { 431 while (ctrl) {
440 cleanup_slots(ctrl); 432 cleanup_slots(ctrl);
441 433
442 kfree (ctrl->pci_bus);
443
444 ctrl->hpc_ops->release_ctlr(ctrl); 434 ctrl->hpc_ops->release_ctlr(ctrl);
445 435
446 tctrl = ctrl; 436 tctrl = ctrl;