summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_mwifiex_sdio.patch
blob: 57ced065466ce83ba3d22873bfa85313e081bdeb (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -112,6 +112,7 @@ mwifiex_sdio_probe(struct sdio_func *fun
 	return ret;
 }
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
 /*
  * SDIO resume.
  *
@@ -156,6 +157,7 @@ static int mwifiex_sdio_resume(struct de
 
 	return 0;
 }
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
 
 /*
  * SDIO remove.
@@ -183,8 +185,10 @@ mwifiex_sdio_remove(struct sdio_func *fu
 	wait_for_completion(&adapter->fw_load);
 
 	if (user_rmmod) {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
 		if (adapter->is_suspended)
 			mwifiex_sdio_resume(adapter->dev);
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
 
 		mwifiex_deauthenticate_all(adapter);
 
@@ -196,6 +200,7 @@ mwifiex_sdio_remove(struct sdio_func *fu
 	mwifiex_remove_card(card->adapter, &add_remove_card_sem);
 }
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
 /*
  * SDIO suspend.
  *
@@ -250,6 +255,7 @@ static int mwifiex_sdio_suspend(struct d
 
 	return ret;
 }
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
 
 /* Device ID for SD8786 */
 #define SDIO_DEVICE_ID_MARVELL_8786   (0x9116)
@@ -275,10 +281,12 @@ static const struct sdio_device_id mwifi
 
 MODULE_DEVICE_TABLE(sdio, mwifiex_ids);
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
 static const struct dev_pm_ops mwifiex_sdio_pm_ops = {
 	.suspend = mwifiex_sdio_suspend,
 	.resume = mwifiex_sdio_resume,
 };
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
 
 static struct sdio_driver mwifiex_sdio = {
 	.name = "mwifiex_sdio",
@@ -287,7 +295,9 @@ static struct sdio_driver mwifiex_sdio =
 	.remove = mwifiex_sdio_remove,
 	.drv = {
 		.owner = THIS_MODULE,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
 		.pm = &mwifiex_sdio_pm_ops,
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
 	}
 };