include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / atm / he.c
index e906658..c213e0d 100644 (file)
@@ -67,6 +67,7 @@
 #include <linux/timer.h>
 #include <linux/interrupt.h>
 #include <linux/dma-mapping.h>
+#include <linux/slab.h>
 #include <asm/io.h>
 #include <asm/byteorder.h>
 #include <asm/uaccess.h>
@@ -2505,7 +2506,7 @@ he_close(struct atm_vcc *vcc)
                 * TBRQ, the host issues the close command to the adapter.
                 */
 
-               while (((tx_inuse = atomic_read(&sk_atm(vcc)->sk_wmem_alloc)) > 0) &&
+               while (((tx_inuse = atomic_read(&sk_atm(vcc)->sk_wmem_alloc)) > 1) &&
                       (retry < MAX_RETRY)) {
                        msleep(sleep);
                        if (sleep < 250)
@@ -2514,7 +2515,7 @@ he_close(struct atm_vcc *vcc)
                        ++retry;
                }
 
-               if (tx_inuse)
+               if (tx_inuse > 1)
                        hprintk("close tx cid 0x%x tx_inuse = %d\n", cid, tx_inuse);
 
                /* 2.3.1.1 generic close operations with flush */