提交 65e291ac 编写于 作者: E Emmanuel Grumbach 提交者: John W. Linville

iwlagn: merge iwl_pci_down and iwl_pci_remove

The latter was the only place that called the first. The two
functions were split when the iwl_pci_probe called iwl_pci_down
upon failure in the probe. Since iwl_pci_probe undoes its work by
itself, there is no need to split between iwl_pci_down, and
iwl_pci_remove.

Thanks to Pavel Roskin for pointing that out.
Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 a944aa9d
...@@ -483,9 +483,13 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -483,9 +483,13 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return err; return err;
} }
static void iwl_pci_down(struct iwl_bus *bus) static void __devexit iwl_pci_remove(struct pci_dev *pdev)
{ {
struct iwl_pci_bus *pci_bus = (struct iwl_pci_bus *) bus->bus_specific; struct iwl_shared *shrd = pci_get_drvdata(pdev);
struct iwl_bus *bus = shrd->bus;
struct iwl_pci_bus *pci_bus = IWL_BUS_GET_PCI_BUS(bus);
iwl_remove(shrd->priv);
pci_disable_msi(pci_bus->pci_dev); pci_disable_msi(pci_bus->pci_dev);
pci_iounmap(pci_bus->pci_dev, pci_bus->hw_base); pci_iounmap(pci_bus->pci_dev, pci_bus->hw_base);
...@@ -496,16 +500,6 @@ static void iwl_pci_down(struct iwl_bus *bus) ...@@ -496,16 +500,6 @@ static void iwl_pci_down(struct iwl_bus *bus)
kfree(bus); kfree(bus);
} }
static void __devexit iwl_pci_remove(struct pci_dev *pdev)
{
struct iwl_shared *shrd = pci_get_drvdata(pdev);
struct iwl_bus *bus = shrd->bus;
iwl_remove(shrd->priv);
iwl_pci_down(bus);
}
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int iwl_pci_suspend(struct device *device) static int iwl_pci_suspend(struct device *device)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册