]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/slip.c
[PATCH] ARM SMP: TLB implementations only affect local CPU
[linux-2.6-omap-h63xx.git] / drivers / net / slip.c
index 19112712daf03ccab4eee49fa32063dbba5e0e84..16363b5c6f56ca95369af6a33b18feeae3bf050f 100644 (file)
@@ -198,18 +198,12 @@ err_exit:
 static void
 sl_free_bufs(struct slip *sl)
 {
-       void * tmp;
-
        /* Free all SLIP frame buffers. */
-       tmp = xchg(&sl->rbuff, NULL);
-       kfree(tmp);
-       tmp = xchg(&sl->xbuff, NULL);
-       kfree(tmp);
+       kfree(xchg(&sl->rbuff, NULL));
+       kfree(xchg(&sl->xbuff, NULL));
 #ifdef SL_INCLUDE_CSLIP
-       tmp = xchg(&sl->cbuff, NULL);
-       kfree(tmp);
-       if ((tmp = xchg(&sl->slcomp, NULL)) != NULL)
-               slhc_free(tmp);
+       kfree(xchg(&sl->cbuff, NULL));
+       slhc_free(xchg(&sl->slcomp, NULL));
 #endif
 }
 
@@ -1389,10 +1383,8 @@ static void __exit slip_exit(void)
        /* First of all: check for active disciplines and hangup them.
         */
        do {
-               if (busy) {
-                       set_current_state(TASK_INTERRUPTIBLE);
-                       schedule_timeout(HZ / 10);
-               }
+               if (busy)
+                       msleep_interruptible(100);
 
                busy = 0;
                for (i = 0; i < slip_maxdev; i++) {