include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / isdn / hisax / isar.c
index 674af67..40b914b 100644 (file)
@@ -13,6 +13,7 @@
 #include "isar.h"
 #include "isdnl1.h"
 #include <linux/interrupt.h>
+#include <linux/slab.h>
 
 #define DBG_LOADFIRM   0
 #define DUMP_MBOXFRAME 2
@@ -138,7 +139,7 @@ waitrecmsg(struct IsdnCardState *cs, u_char *len,
        while((!(cs->BC_Read_Reg(cs, 0, ISAR_IRQBIT) & ISAR_IRQSTA)) &&
                (timeout++ < maxdelay))
                udelay(1);
-       if (timeout >= maxdelay) {
+       if (timeout > maxdelay) {
                printk(KERN_WARNING"isar recmsg IRQSTA timeout\n");
                return(0);
        }
@@ -431,15 +432,16 @@ reterror:
        return(ret);
 }
 
-extern void BChannel_bh(struct BCState *);
 #define B_LL_NOCARRIER 8
 #define B_LL_CONNECT   9
 #define B_LL_OK                10
 
 static void
-isar_bh(struct BCState *bcs)
+isar_bh(struct work_struct *work)
 {
-       BChannel_bh(bcs);
+       struct BCState *bcs = container_of(work, struct BCState, tqueue);
+
+       BChannel_bh(work);
        if (test_and_clear_bit(B_LL_NOCARRIER, &bcs->event))
                ll_deliver_faxstat(bcs, ISDN_FAX_CLASS1_NOCARR);
        if (test_and_clear_bit(B_LL_CONNECT, &bcs->event))
@@ -1580,7 +1582,7 @@ isar_setup(struct IsdnCardState *cs)
                cs->bcs[i].mode = 0;
                cs->bcs[i].hw.isar.dpath = i + 1;
                modeisar(&cs->bcs[i], 0, 0);
-               INIT_WORK(&cs->bcs[i].tqueue, (void *)(void *) isar_bh, &cs->bcs[i]);
+               INIT_WORK(&cs->bcs[i].tqueue, isar_bh);
        }
 }
 
@@ -1893,8 +1895,7 @@ isar_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) {
        return(0);
 }
 
-void __devinit
-initisar(struct IsdnCardState *cs)
+void initisar(struct IsdnCardState *cs)
 {
        cs->bcs[0].BC_SetStack = setstack_isar;
        cs->bcs[1].BC_SetStack = setstack_isar;