diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2012-02-08 19:42:03 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-09 09:12:55 -0800 |
commit | 86587b671bf87ed81d2d89cd1199af912402a05f (patch) | |
tree | a4b45e66fdb5399a5082deadcf79f6a19ad0c346 /drivers/staging/rtl8712/osdep_service.h | |
parent | d8e4cd99d5a13f65fb961e627b63ae70ab0fe951 (diff) |
staging: r8712u: Simplify semaphores
I am preparing to convert this driver from semaphore to mutex locking,
The first step has been to eliminate a number of semaphores that were
initialized but never used, and one whose only use was a single "up"
after initialization. A total of 9 semaphores were removed in this process.
One other change was to remove some inline semaphore routines that were
unused.
In addition, several cases had the following structure:
down()
if () {
...
}
up()
The locking overhead was reduced by moving the up/down inside the if
block.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/osdep_service.h')
-rw-r--r-- | drivers/staging/rtl8712/osdep_service.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h index 1ee943a58c4..9ba603310fd 100644 --- a/drivers/staging/rtl8712/osdep_service.h +++ b/drivers/staging/rtl8712/osdep_service.h @@ -72,18 +72,6 @@ static inline struct list_head *get_list_head(struct __queue *queue) #define LIST_CONTAINOR(ptr, type, member) \ ((type *)((char *)(ptr)-(SIZE_T)(&((type *)0)->member))) -static inline void _enter_hwio_critical(struct semaphore *prwlock, - unsigned long *pirqL) -{ - down(prwlock); -} - -static inline void _exit_hwio_critical(struct semaphore *prwlock, - unsigned long *pirqL) -{ - up(prwlock); -} - static inline void list_delete(struct list_head *plist) { list_del_init(plist); @@ -152,11 +140,6 @@ static inline u32 _down_sema(struct semaphore *sema) return _SUCCESS; } -static inline void _rtl_rwlock_init(struct semaphore *prwlock) -{ - sema_init(prwlock, 1); -} - static inline void _init_listhead(struct list_head *list) { INIT_LIST_HEAD(list); |