Commit 6fe58d68 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman

staging: r8188eu: Replace ATOMIC_T with atomic_t

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2bf9820b
......@@ -191,7 +191,7 @@ struct dvobj_priv {
struct usb_interface *pusbintf;
struct usb_device *pusbdev;
ATOMIC_T continual_urb_error;
atomic_t continual_urb_error;
};
static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
......
......@@ -358,18 +358,16 @@ static inline u32 bitshift(u32 bitmask)
#define PATH_LENGTH_MAX PATH_MAX
/* Atomic integer operations */
#define ATOMIC_T atomic_t
void ATOMIC_SET(ATOMIC_T *v, int i);
int ATOMIC_READ(ATOMIC_T *v);
void ATOMIC_ADD(ATOMIC_T *v, int i);
void ATOMIC_SUB(ATOMIC_T *v, int i);
void ATOMIC_INC(ATOMIC_T *v);
void ATOMIC_DEC(ATOMIC_T *v);
int ATOMIC_ADD_RETURN(ATOMIC_T *v, int i);
int ATOMIC_SUB_RETURN(ATOMIC_T *v, int i);
int ATOMIC_INC_RETURN(ATOMIC_T *v);
int ATOMIC_DEC_RETURN(ATOMIC_T *v);
void ATOMIC_SET(atomic_t *v, int i);
int ATOMIC_READ(atomic_t *v);
void ATOMIC_ADD(atomic_t *v, int i);
void ATOMIC_SUB(atomic_t *v, int i);
void ATOMIC_INC(atomic_t *v);
void ATOMIC_DEC(atomic_t *v);
int ATOMIC_ADD_RETURN(atomic_t *v, int i);
int ATOMIC_SUB_RETURN(atomic_t *v, int i);
int ATOMIC_INC_RETURN(atomic_t *v);
int ATOMIC_DEC_RETURN(atomic_t *v);
struct rtw_netdev_priv_indicator {
void *priv;
......
......@@ -69,7 +69,7 @@ struct evt_priv {
bool c2h_wk_alive;
struct rtw_cbuf *c2h_queue;
#define C2H_QUEUE_MAX_LEN 10
ATOMIC_T event_seq;
atomic_t event_seq;
u8 *evt_buf; /* shall be non-paged, and 4 bytes aligned */
u8 *evt_allocated_buf;
u32 evt_done_cnt;
......
......@@ -401,7 +401,7 @@ struct p2p_oper_class_map {
struct mlme_ext_priv {
struct adapter *padapter;
u8 mlmeext_init;
ATOMIC_T event_seq;
atomic_t event_seq;
u16 mgnt_seq;
unsigned char cur_channel;
......
......@@ -247,52 +247,52 @@ void rtw_sleep_schedulable(int ms)
#define RTW_SUSPEND_LOCK_NAME "rtw_wifi"
inline void ATOMIC_SET(ATOMIC_T *v, int i)
inline void ATOMIC_SET(atomic_t *v, int i)
{
atomic_set(v, i);
}
inline int ATOMIC_READ(ATOMIC_T *v)
inline int ATOMIC_READ(atomic_t *v)
{
return atomic_read(v);
}
inline void ATOMIC_ADD(ATOMIC_T *v, int i)
inline void ATOMIC_ADD(atomic_t *v, int i)
{
atomic_add(i, v);
}
inline void ATOMIC_SUB(ATOMIC_T *v, int i)
inline void ATOMIC_SUB(atomic_t *v, int i)
{
atomic_sub(i, v);
}
inline void ATOMIC_INC(ATOMIC_T *v)
inline void ATOMIC_INC(atomic_t *v)
{
atomic_inc(v);
}
inline void ATOMIC_DEC(ATOMIC_T *v)
inline void ATOMIC_DEC(atomic_t *v)
{
atomic_dec(v);
}
inline int ATOMIC_ADD_RETURN(ATOMIC_T *v, int i)
inline int ATOMIC_ADD_RETURN(atomic_t *v, int i)
{
return atomic_add_return(i, v);
}
inline int ATOMIC_SUB_RETURN(ATOMIC_T *v, int i)
inline int ATOMIC_SUB_RETURN(atomic_t *v, int i)
{
return atomic_sub_return(i, v);
}
inline int ATOMIC_INC_RETURN(ATOMIC_T *v)
inline int ATOMIC_INC_RETURN(atomic_t *v)
{
return atomic_inc_return(v);
}
inline int ATOMIC_DEC_RETURN(ATOMIC_T *v)
inline int ATOMIC_DEC_RETURN(atomic_t *v)
{
return atomic_dec_return(v);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment