Move that code to the iwl-drv.c
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
+void iwl_drv_stop(struct iwl_shared *shrd)
+{
+ iwl_remove(shrd->priv);
+
+ kfree(shrd->nic);
+}
+
int iwl_drv_start(struct iwl_shared *shrd,
struct iwl_trans *trans, struct iwl_cfg *cfg);
int iwl_drv_start(struct iwl_shared *shrd,
struct iwl_trans *trans, struct iwl_cfg *cfg);
+/**
+ * iwl_drv_stop - stop the drv
+ *
+ * @shrd: the shrd area
+ *
+ * TODO: review the parameters given to this function
+ *
+ * Stop the driver. This should be called by bus specific system flows
+ * implementations. For example, the bus specific remove function should first
+ * call this function and then do the bus related operations only.
+ */
+void iwl_drv_stop(struct iwl_shared *shrd);
+
#endif /* __iwl_drv_h__ */
#endif /* __iwl_drv_h__ */
struct iwl_bus *bus = pci_get_drvdata(pdev);
struct iwl_shared *shrd = bus->shrd;
struct iwl_bus *bus = pci_get_drvdata(pdev);
struct iwl_shared *shrd = bus->shrd;
- iwl_remove(shrd->priv);
iwl_trans_free(shrd->trans);
pci_set_drvdata(pdev, NULL);
iwl_trans_free(shrd->trans);
pci_set_drvdata(pdev, NULL);
kfree(bus->shrd);
kfree(bus);
}
kfree(bus->shrd);
kfree(bus);
}