]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: brcm80211: brcmfmac: replace KILL_PROC with send_sig()
authornohee ko <noheek@broadcom.com>
Wed, 13 Oct 2010 21:24:25 +0000 (14:24 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Oct 2010 19:21:52 +0000 (12:21 -0700)
logic optimization : replace KILL_PROC with send_sig()

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/dhd_linux.c
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
drivers/staging/brcm80211/brcmfmac/wl_iw.c
drivers/staging/brcm80211/include/linuxver.h

index 4548e1f865f90860acbe48fa2e6dd6e6385f29dd..579a639ad437d411436954391c450dc8279fa948 100644 (file)
@@ -2340,20 +2340,20 @@ void dhd_detach(dhd_pub_t *dhdp)
                        }
 
                        if (dhd->watchdog_tsk) {
-                               KILL_PROC(dhd->watchdog_tsk->pid, SIGTERM);
+                               send_sig(SIGTERM, dhd->watchdog_tsk, 1);
                                kthread_stop(dhd->watchdog_tsk);
                                dhd->watchdog_tsk = NULL;
                        }
 
                        if (dhd->dpc_tsk) {
-                               KILL_PROC(dhd->dpc_tsk->pid, SIGTERM);
+                               send_sig(SIGTERM, dhd->dpc_tsk, 1);
                                kthread_stop(dhd->dpc_tsk);
                                dhd->dpc_tsk = NULL;
                        } else
                                tasklet_kill(&dhd->tasklet);
 
                        if (dhd->sysioc_tsk) {
-                               KILL_PROC(dhd->sysioc_tsk->pid, SIGTERM);
+                               send_sig(SIGTERM, dhd->sysioc_tsk, 1);
                                kthread_stop(dhd->sysioc_tsk);
                                dhd->sysioc_tsk = NULL;
                        }
index d9f4e9ea511af3aa57d346d71d3ddaea469f4c72..73790341d709ef297475904c2fddbe2351d89eb8 100644 (file)
@@ -2849,7 +2849,7 @@ static s32 wl_create_event_handler(struct wl_priv *wl)
 static void wl_destroy_event_handler(struct wl_priv *wl)
 {
        if (wl->event_tsk) {
-               KILL_PROC(wl->event_tsk->pid, SIGTERM);
+               send_sig(SIGTERM, wl->event_tsk, 1);
                kthread_stop(wl->event_tsk);
                wl->event_tsk = NULL;
        }
@@ -2861,7 +2861,7 @@ static void wl_term_iscan(struct wl_priv *wl)
 
        if (wl->iscan_on && iscan->tsk) {
                iscan->state = WL_ISCAN_STATE_IDLE;
-               KILL_PROC(iscan->tsk->pid, SIGTERM);
+               send_sig(SIGTERM, iscan->tsk, 1);
                kthread_stop(iscan->tsk);
                iscan->tsk = NULL;
        }
@@ -3793,7 +3793,6 @@ static s32 __wl_cfg80211_up(struct wl_priv *wl)
 
 static s32 __wl_cfg80211_down(struct wl_priv *wl)
 {
-       struct net_device *ndev = wl_to_ndev(wl);
        s32 err = 0;
 
        /* Check if cfg80211 interface is already down */
index 6a27f9b938df513f169807a977b58ce1cdbee1c8..a198cf8c939067b77cfeff837d73a157c8d1d033 100644 (file)
@@ -3745,7 +3745,7 @@ void wl_iw_detach(void)
        if (!iscan)
                return;
        if (iscan->sysioc_tsk) {
-               KILL_PROC(iscan->sysioc_tsk->pid, SIGTERM);
+               send_sig(SIGTERM, iscan->sysioc_tsk, 1);
                kthread_stop(iscan->sysioc_tsk);
                iscan->sysioc_tsk = NULL;
        }
index 5b4babd4653ce435f26d9a94e096f1ade7286600..dc721413ee29491978f4adc9837fc71211550092 100644 (file)
 #undef IP_TOS
 #include <asm/io.h>
 
-#define KILL_PROC(pid, sig) \
-       do { \
-               struct task_struct *tsk; \
-               tsk = pid_task(find_vpid(pid), PIDTYPE_PID);    \
-               if (tsk)                        \
-                       send_sig(sig, tsk, 1);  \
-       } while (0)
 #endif                         /* _linuxver_h_ */