diff options
Diffstat (limited to 'drivers/net/wireless/orinoco/orinoco.c')
-rw-r--r-- | drivers/net/wireless/orinoco/orinoco.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco.c b/drivers/net/wireless/orinoco/orinoco.c index 45a04faa7818..067d1a9c728b 100644 --- a/drivers/net/wireless/orinoco/orinoco.c +++ b/drivers/net/wireless/orinoco/orinoco.c | |||
@@ -3157,8 +3157,20 @@ static int orinoco_pm_notifier(struct notifier_block *notifier, | |||
3157 | 3157 | ||
3158 | return NOTIFY_DONE; | 3158 | return NOTIFY_DONE; |
3159 | } | 3159 | } |
3160 | |||
3161 | static void orinoco_register_pm_notifier(struct orinoco_private *priv) | ||
3162 | { | ||
3163 | priv->pm_notifier.notifier_call = orinoco_pm_notifier; | ||
3164 | register_pm_notifier(&priv->pm_notifier); | ||
3165 | } | ||
3166 | |||
3167 | static void orinoco_unregister_pm_notifier(struct orinoco_private *priv) | ||
3168 | { | ||
3169 | unregister_pm_notifier(&priv->pm_notifier); | ||
3170 | } | ||
3160 | #else /* !PM_SLEEP || HERMES_CACHE_FW_ON_INIT */ | 3171 | #else /* !PM_SLEEP || HERMES_CACHE_FW_ON_INIT */ |
3161 | #define orinoco_pm_notifier NULL | 3172 | #define orinoco_register_pm_notifier(priv) do { } while(0) |
3173 | #define orinoco_unregister_pm_notifier(priv) do { } while(0) | ||
3162 | #endif | 3174 | #endif |
3163 | 3175 | ||
3164 | /********************************************************************/ | 3176 | /********************************************************************/ |
@@ -3648,8 +3660,7 @@ struct net_device | |||
3648 | priv->cached_fw = NULL; | 3660 | priv->cached_fw = NULL; |
3649 | 3661 | ||
3650 | /* Register PM notifiers */ | 3662 | /* Register PM notifiers */ |
3651 | priv->pm_notifier.notifier_call = orinoco_pm_notifier; | 3663 | orinoco_register_pm_notifier(priv); |
3652 | register_pm_notifier(&priv->pm_notifier); | ||
3653 | 3664 | ||
3654 | return dev; | 3665 | return dev; |
3655 | } | 3666 | } |
@@ -3673,7 +3684,7 @@ void free_orinocodev(struct net_device *dev) | |||
3673 | kfree(rx_data); | 3684 | kfree(rx_data); |
3674 | } | 3685 | } |
3675 | 3686 | ||
3676 | unregister_pm_notifier(&priv->pm_notifier); | 3687 | orinoco_unregister_pm_notifier(priv); |
3677 | orinoco_uncache_fw(priv); | 3688 | orinoco_uncache_fw(priv); |
3678 | 3689 | ||
3679 | priv->wpa_ie_len = 0; | 3690 | priv->wpa_ie_len = 0; |