summaryrefslogtreecommitdiff
path: root/package/acx/patches/011-no_pm.patch
blob: d1d0feb2f8e19a89b7d6d9854a45679e16277f42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
diff -ruN acx-20070610-old/pci.c acx-20070610-new/pci.c
--- acx-20070610-old/pci.c	2007-09-16 17:57:55.000000000 +0200
+++ acx-20070610-new/pci.c	2007-09-16 17:59:25.000000000 +0200
@@ -1630,7 +1630,9 @@
 	log(L_IRQ|L_INIT, "using IRQ %d\n", pdev->irq);
 
 	/* need to be able to restore PCI state after a suspend */
+#ifdef CONFIG_PM
 	pci_save_state(pdev);
+#endif
 	pci_set_drvdata(pdev, ndev);
 
 	/* ok, pci setup is finished, now start initializing the card */
@@ -1728,7 +1730,9 @@
 	pci_disable_device(pdev);
 fail_pci_enable_device:
 
+#ifdef CONFIG_PM
 	pci_set_power_state(pdev, PCI_D3hot);
+#endif
 
 done:
 	FN_EXIT1(result);
@@ -1848,7 +1852,9 @@
 	free_netdev(ndev);
 
 	/* put device into ACPI D3 mode (shutdown) */
+#ifdef CONFIG_PM
 	pci_set_power_state(pdev, PCI_D3hot);
+#endif
 
 end:
 	FN_EXIT0;