summaryrefslogtreecommitdiff
path: root/patches/0085-iwlwifi-pci-device-removal.patch
blob: f61f01722c7970e6d83531b20be96db60eefb80a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index cc8c53dc0ab6..68296b65a680 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -1941,6 +1941,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
 	char *prop[] = {"EVENT=INACCESSIBLE", NULL};
 
 	dev_err(&pdev->dev, "Device gone - attempting removal\n");
@@ -1949,6 +1952,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);