include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / isdn / hisax / hfc_2bs0.c
index bb376f3..b1f6481 100644 (file)
@@ -16,6 +16,7 @@
 #include "isac.h"
 #include "isdnl1.h"
 #include <linux/interrupt.h>
+#include <linux/slab.h>
 
 static inline int
 WaitForBusy(struct IsdnCardState *cs)
@@ -52,7 +53,7 @@ WaitNoBusy(struct IsdnCardState *cs)
                return (to);
 }
 
-int
+static int
 GetFreeFifoBytes(struct BCState *bcs)
 {
        int s;
@@ -66,7 +67,7 @@ GetFreeFifoBytes(struct BCState *bcs)
        return (s);
 }
 
-int
+static int
 ReadZReg(struct BCState *bcs, u_char reg)
 {
        int val;
@@ -394,7 +395,7 @@ main_irq_hfc(struct BCState *bcs)
        return;
 }
 
-void
+static void
 mode_hfc(struct BCState *bcs, int mode, int bc)
 {
        struct IsdnCardState *cs = bcs->cs;
@@ -507,7 +508,7 @@ hfc_l2l1(struct PStack *st, int pr, void *arg)
 }
 
 
-void
+static void
 close_hfcstate(struct BCState *bcs)
 {
        mode_hfc(bcs, 0, bcs->channel);
@@ -537,7 +538,7 @@ open_hfcstate(struct IsdnCardState *cs, struct BCState *bcs)
        return (0);
 }
 
-int
+static int
 setstack_hfc(struct PStack *st, struct BCState *bcs)
 {
        bcs->channel = st->l1.bc;
@@ -551,7 +552,7 @@ setstack_hfc(struct PStack *st, struct BCState *bcs)
        return (0);
 }
 
-void __init
+static void
 init_send(struct BCState *bcs)
 {
        int i;
@@ -565,7 +566,7 @@ init_send(struct BCState *bcs)
                bcs->hw.hfc.send[i] = 0x1fff;
 }
 
-void __init
+void
 inithfc(struct IsdnCardState *cs)
 {
        init_send(&cs->bcs[0]);
@@ -582,12 +583,8 @@ inithfc(struct IsdnCardState *cs)
 void
 releasehfc(struct IsdnCardState *cs)
 {
-       if (cs->bcs[0].hw.hfc.send) {
-               kfree(cs->bcs[0].hw.hfc.send);
-               cs->bcs[0].hw.hfc.send = NULL;
-       }
-       if (cs->bcs[1].hw.hfc.send) {
-               kfree(cs->bcs[1].hw.hfc.send);
-               cs->bcs[1].hw.hfc.send = NULL;
-       }
+       kfree(cs->bcs[0].hw.hfc.send);
+       cs->bcs[0].hw.hfc.send = NULL;
+       kfree(cs->bcs[1].hw.hfc.send);
+       cs->bcs[1].hw.hfc.send = NULL;
 }