staging: rtl8192e: Remove unnecessary ps_lock
authorMike McCormack <mikem@ring3k.org>
Thu, 3 Mar 2011 13:41:12 +0000 (22:41 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Mar 2011 21:31:41 +0000 (13:31 -0800)
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rtl8192e/r8190_rtl8256.c
drivers/staging/rtl8192e/r8192E.h
drivers/staging/rtl8192e/r8192E_core.c

index 9513af9268cb7fcde1d53756df103831b54e7c61..0838bec7b6822f4b87d617a8abf8723646f2bf57 100644 (file)
@@ -327,8 +327,6 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
        PRT_POWER_SAVE_CONTROL  pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl));
        bool bResult = true;
 
-       spin_lock(&priv->ps_lock);
-
        if (eRFPowerState == priv->ieee80211->eRFPowerState &&
            priv->bHwRfOffAction == 0) {
                bResult = false;
@@ -429,7 +427,6 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
        }
 
 out:
-       spin_unlock(&priv->ps_lock);
        return bResult;
 }
 
index 4278091a9b15c44a1dc770b1d88a9d11aa6ffeac..9b93ed9a57502bd83ba213f512acf750a76c032b 100644 (file)
@@ -808,7 +808,6 @@ typedef struct r8192_priv
        spinlock_t irq_th_lock;
        spinlock_t rf_ps_lock;
         struct mutex mutex;
-       spinlock_t ps_lock;
 
        short chan;
        short sens;
index 0c88a2592e56f9c41902b1ed4c9952a69d1ff6fa..cc20e5d7f5af38430cf376027efebfeccc4027ee 100644 (file)
@@ -1883,8 +1883,6 @@ static void rtl8192_hw_to_sleep(struct net_device *dev, u32 th, u32 tl)
        u32 tmp;
        u32 rb = jiffies;
 
-       spin_lock(&priv->ps_lock);
-
        // Writing HW register with 0 equals to disable
        // the timer, that is not really what we want
        //
@@ -1897,14 +1895,14 @@ static void rtl8192_hw_to_sleep(struct net_device *dev, u32 th, u32 tl)
        if(((tl>=rb)&& (tl-rb) <= MSECS(MIN_SLEEP_TIME))
                        ||((rb>tl)&& (rb-tl) < MSECS(MIN_SLEEP_TIME))) {
                printk("too short to sleep::%x, %x, %lx\n",tl, rb,  MSECS(MIN_SLEEP_TIME));
-               goto out_unlock;
+               return;
        }
 
        if(((tl > rb) && ((tl-rb) > MSECS(MAX_SLEEP_TIME)))||
                        ((tl < rb) && (tl>MSECS(69)) && ((rb-tl) > MSECS(MAX_SLEEP_TIME)))||
                        ((tl<rb)&&(tl<MSECS(69))&&((tl+0xffffffff-rb)>MSECS(MAX_SLEEP_TIME)))) {
                printk("========>too long to sleep:%x, %x, %lx\n", tl, rb,  MSECS(MAX_SLEEP_TIME));
-               goto out_unlock;
+               return;
        }
 
        tmp = (tl>rb)?(tl-rb):(rb-tl);
@@ -1913,8 +1911,6 @@ static void rtl8192_hw_to_sleep(struct net_device *dev, u32 th, u32 tl)
 
        queue_delayed_work(priv->ieee80211->wq,
                        (void *)&priv->ieee80211->hw_sleep_wq,0);
-out_unlock:
-       spin_unlock(&priv->ps_lock);
 }
 
 static void rtl8192_init_priv_variable(struct net_device* dev)
@@ -2043,7 +2039,6 @@ static void rtl8192_init_priv_lock(struct r8192_priv* priv)
 {
        spin_lock_init(&priv->irq_th_lock);
        spin_lock_init(&priv->rf_ps_lock);
-       spin_lock_init(&priv->ps_lock);
        sema_init(&priv->wx_sem,1);
        sema_init(&priv->rf_sem,1);
        mutex_init(&priv->mutex);
This page took 0.031013 seconds and 5 git commands to generate.