diff options
author | David S. Miller <davem@davemloft.net> | 2009-02-25 03:02:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-25 03:02:05 -0500 |
commit | f11c179eea77b8afc2fb7cb4b9a8815b85e3c16f (patch) | |
tree | 9edf1e86fbb91815f31d7728820d098041f03bb9 /drivers/net/wireless/orinoco | |
parent | 4545a3f2765bb7d2d93468a8ffa578ac87a2c5c7 (diff) | |
parent | 0c9a3aaaf30e1d1994de58c554ef97a719e20892 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/orinoco/orinoco.c
Diffstat (limited to 'drivers/net/wireless/orinoco')
-rw-r--r-- | drivers/net/wireless/orinoco/main.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index 54dfc4540b82..e9b1db77a735 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c | |||
@@ -2076,8 +2076,20 @@ static int orinoco_pm_notifier(struct notifier_block *notifier, | |||
2076 | 2076 | ||
2077 | return NOTIFY_DONE; | 2077 | return NOTIFY_DONE; |
2078 | } | 2078 | } |
2079 | |||
2080 | static void orinoco_register_pm_notifier(struct orinoco_private *priv) | ||
2081 | { | ||
2082 | priv->pm_notifier.notifier_call = orinoco_pm_notifier; | ||
2083 | register_pm_notifier(&priv->pm_notifier); | ||
2084 | } | ||
2085 | |||
2086 | static void orinoco_unregister_pm_notifier(struct orinoco_private *priv) | ||
2087 | { | ||
2088 | unregister_pm_notifier(&priv->pm_notifier); | ||
2089 | } | ||
2079 | #else /* !PM_SLEEP || HERMES_CACHE_FW_ON_INIT */ | 2090 | #else /* !PM_SLEEP || HERMES_CACHE_FW_ON_INIT */ |
2080 | #define orinoco_pm_notifier NULL | 2091 | #define orinoco_register_pm_notifier(priv) do { } while(0) |
2092 | #define orinoco_unregister_pm_notifier(priv) do { } while(0) | ||
2081 | #endif | 2093 | #endif |
2082 | 2094 | ||
2083 | /********************************************************************/ | 2095 | /********************************************************************/ |
@@ -2572,8 +2584,7 @@ struct net_device | |||
2572 | priv->cached_fw = NULL; | 2584 | priv->cached_fw = NULL; |
2573 | 2585 | ||
2574 | /* Register PM notifiers */ | 2586 | /* Register PM notifiers */ |
2575 | priv->pm_notifier.notifier_call = orinoco_pm_notifier; | 2587 | orinoco_register_pm_notifier(priv); |
2576 | register_pm_notifier(&priv->pm_notifier); | ||
2577 | 2588 | ||
2578 | return dev; | 2589 | return dev; |
2579 | } | 2590 | } |
@@ -2598,7 +2609,7 @@ void free_orinocodev(struct net_device *dev) | |||
2598 | kfree(rx_data); | 2609 | kfree(rx_data); |
2599 | } | 2610 | } |
2600 | 2611 | ||
2601 | unregister_pm_notifier(&priv->pm_notifier); | 2612 | orinoco_unregister_pm_notifier(priv); |
2602 | orinoco_uncache_fw(priv); | 2613 | orinoco_uncache_fw(priv); |
2603 | 2614 | ||
2604 | priv->wpa_ie_len = 0; | 2615 | priv->wpa_ie_len = 0; |