mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
wifi: iwlwifi: gen1_2: move gen specific code to a function
The remove function will be called also for gen3 devices, so move out the gen1_2 code to a function that will be called only for gen1/2 devices. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250828111032.a584254bcf83.I69d176b94d23f0f34d28733c48964f277a0a67a1@changeid
This commit is contained in:
parent
6f2d548e0d
commit
df70a9a86e
|
|
@ -1171,16 +1171,11 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
static void iwl_pci_remove(struct pci_dev *pdev)
|
||||
{
|
||||
struct iwl_trans *trans = pci_get_drvdata(pdev);
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
|
||||
if (!trans)
|
||||
return;
|
||||
|
||||
cancel_delayed_work_sync(&trans_pcie->me_recheck_wk);
|
||||
|
||||
iwl_drv_stop(trans->drv);
|
||||
|
||||
iwl_trans_pcie_free(trans);
|
||||
iwl_pcie_gen1_2_remove(trans);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
|
|
|||
|
|
@ -1103,6 +1103,7 @@ int iwl_pci_gen1_2_probe(struct pci_dev *pdev,
|
|||
const struct pci_device_id *ent,
|
||||
const struct iwl_mac_cfg *mac_cfg,
|
||||
u8 __iomem *hw_base, u32 hw_rev);
|
||||
void iwl_pcie_gen1_2_remove(struct iwl_trans *trans);
|
||||
|
||||
/* transport gen 1 exported functions */
|
||||
void iwl_trans_pcie_fw_alive(struct iwl_trans *trans);
|
||||
|
|
|
|||
|
|
@ -4298,6 +4298,17 @@ int iwl_pci_gen1_2_probe(struct pci_dev *pdev,
|
|||
return ret;
|
||||
}
|
||||
|
||||
void iwl_pcie_gen1_2_remove(struct iwl_trans *trans)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
|
||||
cancel_delayed_work_sync(&trans_pcie->me_recheck_wk);
|
||||
|
||||
iwl_drv_stop(trans->drv);
|
||||
|
||||
iwl_trans_pcie_free(trans);
|
||||
}
|
||||
|
||||
int iwl_pcie_gen1_2_finish_nic_init(struct iwl_trans *trans)
|
||||
{
|
||||
const struct iwl_mac_cfg *mac_cfg = trans->mac_cfg;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user