blob: b7536d933f47a098286a079ef7c6ddbb4f84fc1c [file] [log] [blame]
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index f74281508197..3b11bd68f261 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -1926,6 +1926,9 @@ static void iwl_trans_pcie_removal_wk(st
struct iwl_trans_pcie_removal *removal =
container_of(wk, struct iwl_trans_pcie_removal, work);
struct pci_dev *pdev = removal->pdev;
+#if LINUX_VERSION_IS_LESS(3,14,0)
+ dev_err(&pdev->dev, "Device gone - can't remove on old kernels.\n");
+#else
static char *prop[] = {"EVENT=INACCESSIBLE", NULL};
dev_err(&pdev->dev, "Device gone - attempting removal\n");
@@ -1934,6 +1937,7 @@ static void iwl_trans_pcie_removal_wk(st
pci_dev_put(pdev);
pci_stop_and_remove_bus_device(pdev);
pci_unlock_rescan_remove();
+#endif /* LINUX_VERSION_IS_LESS(3,14,0) */
kfree(removal);
module_put(THIS_MODULE);