提交 ce9e80af 编写于 作者: J Johannes Berg 提交者: John W. Linville

iwlwifi: reduce IDI code ifdef

The code in the two branches of the #ifdef
is almost the same so move the common code
outside the #ifdef.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 706c4ff6
......@@ -278,17 +278,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
#ifdef CONFIG_IWLWIFI_IDI
iwl_trans = iwl_trans_idi_alloc(shrd, pdev, ent);
if (iwl_trans == NULL) {
err = -ENOMEM;
goto out_free_bus;
}
shrd->trans = iwl_trans;
pci_set_drvdata(pdev, iwl_trans);
err = iwl_drv_start(shrd, iwl_trans, cfg);
#else
iwl_trans = iwl_trans_pcie_alloc(shrd, pdev, ent);
#endif
if (iwl_trans == NULL) {
err = -ENOMEM;
goto out_free_bus;
......@@ -298,7 +290,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_set_drvdata(pdev, iwl_trans);
err = iwl_drv_start(shrd, iwl_trans, cfg);
#endif
if (err)
goto out_free_trans;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册