staging: r8188eu: Replace wrappers for atomic_inc and atomic_inc_return
authorLarry Finger <Larry.Finger@lwfinger.net>
Sun, 22 Dec 2013 23:36:38 +0000 (17:36 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 00:02:09 +0000 (16:02 -0800)
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
drivers/staging/rtl8188eu/include/osdep_service.h
drivers/staging/rtl8188eu/include/usb_ops.h
drivers/staging/rtl8188eu/os_dep/osdep_service.c

index f7bf98b1d835a9bc7ae9e471bf8d7f1646dabea1..6f7e415ecb6ce7851c5054a34b3fbd7c50b20f41 100644 (file)
@@ -7070,7 +7070,7 @@ void report_survey_event(struct adapter *padapter, union recv_frame *precv_frame
        pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
        pc2h_evt_hdr->len = sizeof(struct survey_event);
        pc2h_evt_hdr->ID = GEN_EVT_CODE(_Survey);
-       pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq);
+       pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
 
        psurvey_evt = (struct survey_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
 
@@ -7122,7 +7122,7 @@ void report_surveydone_event(struct adapter *padapter)
        pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
        pc2h_evt_hdr->len = sizeof(struct surveydone_event);
        pc2h_evt_hdr->ID = GEN_EVT_CODE(_SurveyDone);
-       pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq);
+       pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
 
        psurveydone_evt = (struct surveydone_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
        psurveydone_evt->bss_cnt = pmlmeext->sitesurvey_res.bss_cnt;
@@ -7168,7 +7168,7 @@ void report_join_res(struct adapter *padapter, int res)
        pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
        pc2h_evt_hdr->len = sizeof(struct joinbss_event);
        pc2h_evt_hdr->ID = GEN_EVT_CODE(_JoinBss);
-       pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq);
+       pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
 
        pjoinbss_evt = (struct joinbss_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
        memcpy((unsigned char *)(&(pjoinbss_evt->network.network)), &(pmlmeinfo->network), sizeof(struct wlan_bssid_ex));
@@ -7221,7 +7221,7 @@ void report_del_sta_event(struct adapter *padapter, unsigned char *MacAddr, unsi
        pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
        pc2h_evt_hdr->len = sizeof(struct stadel_event);
        pc2h_evt_hdr->ID = GEN_EVT_CODE(_DelSTA);
-       pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq);
+       pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
 
        pdel_sta_evt = (struct stadel_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
        memcpy((unsigned char *)(&(pdel_sta_evt->macaddr)), MacAddr, ETH_ALEN);
@@ -7276,7 +7276,7 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *MacAddr, int
        pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
        pc2h_evt_hdr->len = sizeof(struct stassoc_event);
        pc2h_evt_hdr->ID = GEN_EVT_CODE(_AddSTA);
-       pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq);
+       pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
 
        padd_sta_evt = (struct stassoc_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
        memcpy((unsigned char *)(&(padd_sta_evt->macaddr)), MacAddr, ETH_ALEN);
@@ -8322,7 +8322,7 @@ u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf)
                goto _abort_event_;
        }
 
-       ATOMIC_INC(&pevt_priv->event_seq);
+       atomic_inc(&pevt_priv->event_seq);
 
        peventbuf += 2;
 
index 593d5a8c9b93638c4f14bdcf41f3137f739269ac..6dc0707d91d47f45b2c98fa50207a447d65d251b 100644 (file)
@@ -357,10 +357,6 @@ static inline u32 bitshift(u32 bitmask)
 /*  limitation of path length */
 #define PATH_LENGTH_MAX PATH_MAX
 
-/* Atomic integer operations */
-void ATOMIC_INC(atomic_t *v);
-int ATOMIC_INC_RETURN(atomic_t *v);
-
 struct rtw_netdev_priv_indicator {
        void *priv;
        u32 sizeof_priv;
index b424442b350e37506f3d3e550c1735fe2733a5dc..7d33477d551d82119dff17ec0c127d9446e09a3a 100644 (file)
@@ -77,7 +77,7 @@ static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj)
 {
        int ret = false;
        int value;
-       value = ATOMIC_INC_RETURN(&dvobj->continual_urb_error);
+       value = atomic_inc_return(&dvobj->continual_urb_error);
        if (value > MAX_CONTINUAL_URB_ERR) {
                DBG_88E("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n",
                        dvobj, value, MAX_CONTINUAL_URB_ERR);
index b699fe076497340c47eaa43bc82346e779b5357a..77f5310ef0a12cabbd5e9e5eb9df6fa63de153c3 100644 (file)
@@ -247,16 +247,6 @@ void rtw_sleep_schedulable(int ms)
 
 #define RTW_SUSPEND_LOCK_NAME "rtw_wifi"
 
-inline void ATOMIC_INC(atomic_t *v)
-{
-       atomic_inc(v);
-}
-
-inline int ATOMIC_INC_RETURN(atomic_t *v)
-{
-       return atomic_inc_return(v);
-}
-
 struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv,
                                                    void *old_priv)
 {