[PATCH] drivers/isdn/hisax/: possible cleanups
authorAdrian Bunk <bunk@stusta.de>
Sat, 25 Jun 2005 21:59:18 +0000 (14:59 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 25 Jun 2005 23:25:07 +0000 (16:25 -0700)
This patch contains the following possible cleanups:
- make needlessly global code static
- remove the compiled but unused st5481_hdlc.{c,h}
- kill enternow.h
- enternow_pci.c: kill InByte/OutByte/BYTE
- isdnl2.c: kill FreeSkb
- remove or #if 0 the following unused functions:
  - config.c: IsdnCardState
  - ipacx.c: ipacx_new_ph
  - ipacx.c: dch_bh
  - ipacx.c: setup_ipacx
  - isdnl2.c: IsRR

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Kai Germaschewski <kai@germaschewski.name>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
60 files changed:
drivers/isdn/hisax/Makefile
drivers/isdn/hisax/amd7930_fn.c
drivers/isdn/hisax/asuscom.c
drivers/isdn/hisax/avm_pci.c
drivers/isdn/hisax/bkm_a4t.c
drivers/isdn/hisax/bkm_a8.c
drivers/isdn/hisax/callc.c
drivers/isdn/hisax/config.c
drivers/isdn/hisax/diva.c
drivers/isdn/hisax/elsa.c
drivers/isdn/hisax/elsa_ser.c
drivers/isdn/hisax/enternow.h [deleted file]
drivers/isdn/hisax/enternow_pci.c
drivers/isdn/hisax/gazel.c
drivers/isdn/hisax/hfc4s8s_l1.c
drivers/isdn/hisax/hfc_2bds0.c
drivers/isdn/hisax/hfc_2bs0.c
drivers/isdn/hisax/hfc_pci.c
drivers/isdn/hisax/hfc_pci.h
drivers/isdn/hisax/hfc_sx.c
drivers/isdn/hisax/hfc_sx.h
drivers/isdn/hisax/hfc_usb.c
drivers/isdn/hisax/hfc_usb.h
drivers/isdn/hisax/hfcscard.c
drivers/isdn/hisax/hisax.h
drivers/isdn/hisax/hscx.c
drivers/isdn/hisax/icc.c
drivers/isdn/hisax/ipacx.c
drivers/isdn/hisax/isac.c
drivers/isdn/hisax/isar.c
drivers/isdn/hisax/isdnl1.c
drivers/isdn/hisax/isdnl2.c
drivers/isdn/hisax/isdnl3.c
drivers/isdn/hisax/isurf.c
drivers/isdn/hisax/ix1_micro.c
drivers/isdn/hisax/jade.c
drivers/isdn/hisax/jade.h
drivers/isdn/hisax/l3_1tr6.c
drivers/isdn/hisax/l3dss1.c
drivers/isdn/hisax/l3ni1.c
drivers/isdn/hisax/mic.c
drivers/isdn/hisax/netjet.c
drivers/isdn/hisax/niccy.c
drivers/isdn/hisax/nj_s.c
drivers/isdn/hisax/nj_u.c
drivers/isdn/hisax/q931.c
drivers/isdn/hisax/s0box.c
drivers/isdn/hisax/saphir.c
drivers/isdn/hisax/sedlbauer.c
drivers/isdn/hisax/sportster.c
drivers/isdn/hisax/st5481.h
drivers/isdn/hisax/st5481_hdlc.c [deleted file]
drivers/isdn/hisax/st5481_hdlc.h [deleted file]
drivers/isdn/hisax/st5481_usb.c
drivers/isdn/hisax/tei.c
drivers/isdn/hisax/teleint.c
drivers/isdn/hisax/teles0.c
drivers/isdn/hisax/teles3.c
drivers/isdn/hisax/telespci.c
drivers/isdn/hisax/w6692.c

index 8d6bb56754b8c08a5b0d8d392cc2f35996783a8a..293e27789d54caf983ec2b6d0b53b80548e89e64 100644 (file)
@@ -23,7 +23,7 @@ endif
 # Multipart objects.
 
 hisax_st5481-y                                 := st5481_init.o st5481_usb.o st5481_d.o \
-                                          st5481_b.o st5481_hdlc.o
+                                          st5481_b.o
 
 hisax-y                                        := config.o isdnl1.o tei.o isdnl2.o isdnl3.o \
                                           lmgr.o q931.o callc.o fsm.o
index c4f861a5db25791f3bd9b5fb867cc5dec4ddbae8..8ae08c41c853ef8f65b8010688a658ad9f79957e 100644 (file)
@@ -97,7 +97,7 @@ static WORD initAMD[] = {
 };
 
 
-void /* macro wWordAMD */
+static void /* macro wWordAMD */
 WriteWordAmd7930(struct IsdnCardState *cs, BYTE reg, WORD val)
 {
         wByteAMD(cs, 0x00, reg);
@@ -105,7 +105,7 @@ WriteWordAmd7930(struct IsdnCardState *cs, BYTE reg, WORD val)
         wByteAMD(cs, 0x01, HIBYTE(val));
 }
 
-WORD /* macro rWordAMD */
+static WORD /* macro rWordAMD */
 ReadWordAmd7930(struct IsdnCardState *cs, BYTE reg)
 {
         WORD res;
@@ -665,7 +665,7 @@ Amd7930_l1hw(struct PStack *st, int pr, void *arg)
        }
 }
 
-void
+static void
 setstack_Amd7930(struct PStack *st, struct IsdnCardState *cs)
 {
 
@@ -676,7 +676,7 @@ setstack_Amd7930(struct PStack *st, struct IsdnCardState *cs)
 }
 
 
-void
+static void
 DC_Close_Amd7930(struct IsdnCardState *cs) {
         if (cs->debug & L1_DEB_ISAC)
                debugl1(cs, "Amd7930: DC_Close called");
index 7546e2e4a94ea766b09140a874aef6f1cc93e5fc..a98c5e38bbbc527ac512028887f3f4a645ee509b 100644 (file)
@@ -22,7 +22,7 @@
 
 extern const char *CardType[];
 
-const char *Asuscom_revision = "$Revision: 1.14.2.4 $";
+static const char *Asuscom_revision = "$Revision: 1.14.2.4 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -239,7 +239,7 @@ Start_IPAC:
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_asuscom(struct IsdnCardState *cs)
 {
        int bytecnt = 8;
index 6fcb2cf7b0b69f97b1532c9728dc49785401d4cc..625799ab0d14d5292c96d3c41e01c90148e55567 100644 (file)
@@ -172,7 +172,7 @@ struct BCState *Sel_BCS(struct IsdnCardState *cs, int channel)
                return(NULL);
 }
 
-void
+static void
 write_ctrl(struct BCState *bcs, int which) {
 
        if (bcs->cs->debug & L1_DEB_HSCX)
@@ -193,7 +193,7 @@ write_ctrl(struct BCState *bcs, int which) {
        }
 }
 
-void
+static void
 modehdlc(struct BCState *bcs, int mode, int bc)
 {
        struct IsdnCardState *cs = bcs->cs;
@@ -451,7 +451,7 @@ HDLC_irq(struct BCState *bcs, u_int stat) {
        }
 }
 
-inline void
+static inline void
 HDLC_irq_main(struct IsdnCardState *cs)
 {
        u_int stat;
@@ -487,7 +487,7 @@ HDLC_irq_main(struct IsdnCardState *cs)
        }
 }
 
-void
+static void
 hdlc_l2l1(struct PStack *st, int pr, void *arg)
 {
        struct BCState *bcs = st->l1.bcs;
@@ -547,7 +547,7 @@ hdlc_l2l1(struct PStack *st, int pr, void *arg)
        }
 }
 
-void
+static void
 close_hdlcstate(struct BCState *bcs)
 {
        modehdlc(bcs, 0, 0);
@@ -570,7 +570,7 @@ close_hdlcstate(struct BCState *bcs)
        }
 }
 
-int
+static int
 open_hdlcstate(struct IsdnCardState *cs, struct BCState *bcs)
 {
        if (!test_and_set_bit(BC_FLG_INIT, &bcs->Flag)) {
@@ -598,7 +598,7 @@ open_hdlcstate(struct IsdnCardState *cs, struct BCState *bcs)
        return (0);
 }
 
-int
+static int
 setstack_hdlc(struct PStack *st, struct BCState *bcs)
 {
        bcs->channel = st->l1.bc;
@@ -612,6 +612,7 @@ setstack_hdlc(struct PStack *st, struct BCState *bcs)
        return (0);
 }
 
+#if 0
 void __init
 clear_pending_hdlc_ints(struct IsdnCardState *cs)
 {
@@ -641,8 +642,9 @@ clear_pending_hdlc_ints(struct IsdnCardState *cs)
                debugl1(cs, "HDLC 2 VIN %x", val);
        }
 }
+#endif  /*  0  */
 
-void __init
+static void __init
 inithdlc(struct IsdnCardState *cs)
 {
        cs->bcs[0].BC_SetStack = setstack_hdlc;
index f410f628a3e20202b72d942e78e7b8c6093e2669..dcb308aeb50cccdac293e64aae89a7ee7631fd9d 100644 (file)
@@ -23,7 +23,7 @@
 
 extern const char *CardType[];
 
-const char *bkm_a4t_revision = "$Revision: 1.22.2.4 $";
+static const char *bkm_a4t_revision = "$Revision: 1.22.2.4 $";
 
 
 static inline u_char
@@ -167,7 +167,7 @@ bkm_interrupt(int intno, void *dev_id, struct pt_regs *regs)
        }
 }
 
-void
+static void
 release_io_bkm(struct IsdnCardState *cs)
 {
        if (cs->hw.ax.base) {
index 94bb83ce7fd82a28fc9ebb4ad89bf3c2cd20710b..5f21b82c8c8dcba3699b3ee89d112c3439313357 100644 (file)
@@ -27,7 +27,7 @@
 
 extern const char *CardType[];
 
-const char sct_quadro_revision[] = "$Revision: 1.22.2.4 $";
+static const char sct_quadro_revision[] = "$Revision: 1.22.2.4 $";
 
 static const char *sct_quadro_subtypes[] =
 {
@@ -193,7 +193,7 @@ bkm_interrupt_ipac(int intno, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_sct_quadro(struct IsdnCardState *cs)
 {
        release_region(cs->hw.ax.base & 0xffffffc0, 128);
@@ -261,7 +261,7 @@ BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return (0);
 }
 
-int __init
+static int __init
 sct_alloc_io(u_int adr, u_int len)
 {
        if (!request_region(adr, len, "scitel")) {
index 04065ab2610f9f228754b2837ecc99d8753cdeb9..7c56c44f0fd16955be1e7c488bfc862e709f24a1 100644 (file)
@@ -874,7 +874,7 @@ release_b_st(struct Channel *chanp)
        } 
 }
 
-struct Channel
+static struct Channel
 *selectfreechannel(struct PStack *st, int bch)
 {
        struct IsdnCardState *cs = st->l1.hardware;
@@ -1429,7 +1429,7 @@ capi_debug(struct Channel *chanp, capi_msg *cm)
        HiSax_putstatus(chanp->cs, "Ch", "%d CAPIMSG %s", chanp->chan, tmpbuf);
 }
 
-void
+static void
 lli_got_fac_req(struct Channel *chanp, capi_msg *cm) {
        if ((cm->para[0] != 3) || (cm->para[1] != 0))
                return;
@@ -1454,7 +1454,7 @@ lli_got_fac_req(struct Channel *chanp, capi_msg *cm) {
        }
 }
 
-void
+static void
 lli_got_manufacturer(struct Channel *chanp, struct IsdnCardState *cs, capi_msg *cm) {
        if ((cs->typ == ISDN_CTYPE_ELSA) || (cs->typ == ISDN_CTYPE_ELSA_PNP) ||
                (cs->typ == ISDN_CTYPE_ELSA_PCI)) {
index 1663ee69d41d22a3afc0e2312359a69892855393..c542e6fb2bde736f4c8a1e5efeda10e6c2bb46f0 100644 (file)
@@ -332,7 +332,7 @@ struct IsdnCard cards[HISAX_MAX_CARDS] = {
 #define HISAX_IDSIZE (HISAX_MAX_CARDS*8)
 static char HiSaxID[HISAX_IDSIZE] = { 0, };
 
-char *HiSax_id = HiSaxID;
+static char *HiSax_id = HiSaxID;
 #ifdef MODULE
 /* Variables for insmod */
 static int type[HISAX_MAX_CARDS] = { 0, };
@@ -391,7 +391,7 @@ char *HiSax_getrev(const char *revision)
        return rev;
 }
 
-void __init HiSaxVersion(void)
+static void __init HiSaxVersion(void)
 {
        char tmp[64];
 
@@ -608,6 +608,7 @@ static inline struct IsdnCardState *hisax_findcard(int driverid)
 /*
  * Find card with given card number
  */
+#if 0
 struct IsdnCardState *hisax_get_card(int cardnr)
 {
        if ((cardnr <= nrcards) && (cardnr > 0))
@@ -615,8 +616,9 @@ struct IsdnCardState *hisax_get_card(int cardnr)
                        return cards[cardnr - 1].cs;
        return NULL;
 }
+#endif  /*  0  */
 
-int HiSax_readstatus(u_char __user *buf, int len, int id, int channel)
+static int HiSax_readstatus(u_char __user *buf, int len, int id, int channel)
 {
        int count, cnt;
        u_char __user *p = buf;
@@ -768,7 +770,7 @@ int ll_run(struct IsdnCardState *cs, int addfeatures)
        return 0;
 }
 
-void ll_stop(struct IsdnCardState *cs)
+static void ll_stop(struct IsdnCardState *cs)
 {
        isdn_ctrl ic;
 
@@ -1184,7 +1186,7 @@ static int checkcard(int cardnr, char *id, int *busy_flag, struct module *lockow
        return ret;
 }
 
-void HiSax_shiftcards(int idx)
+static void HiSax_shiftcards(int idx)
 {
        int i;
 
@@ -1192,7 +1194,7 @@ void HiSax_shiftcards(int idx)
                memcpy(&cards[i], &cards[i + 1], sizeof(cards[i]));
 }
 
-int HiSax_inithardware(int *busy_flag)
+static int HiSax_inithardware(int *busy_flag)
 {
        int foundcards = 0;
        int i = 0;
index 394d481e093fde584c61ce5e13545b66bdd8f6a6..b62d6b30b72b861711090ef5d7fd2b591b615828 100644 (file)
@@ -28,7 +28,7 @@
 
 extern const char *CardType[];
 
-const char *Diva_revision = "$Revision: 1.33.2.6 $";
+static const char *Diva_revision = "$Revision: 1.33.2.6 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -706,7 +706,7 @@ diva_irq_ipacx_pci(int intno, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_diva(struct IsdnCardState *cs)
 {
        int bytecnt;
index 4d7a0250d7e20b8c59de10799f9f526e4379f8be..110e9fd669c53a98b36b271a4771d7034a4c8549 100644 (file)
 
 extern const char *CardType[];
 
-const char *Elsa_revision = "$Revision: 2.32.2.4 $";
-const char *Elsa_Types[] =
+static const char *Elsa_revision = "$Revision: 2.32.2.4 $";
+static const char *Elsa_Types[] =
 {"None", "PC", "PCC-8", "PCC-16", "PCF", "PCF-Pro",
  "PCMCIA", "QS 1000", "QS 3000", "Microlink PCI", "QS 3000 PCI", 
  "PCMCIA-IPAC" };
 
-const char *ITACVer[] =
+static const char *ITACVer[] =
 {"?0?", "?1?", "?2?", "?3?", "?4?", "V2.2",
  "B1", "A1"};
 
@@ -425,7 +425,7 @@ Start_IPAC:
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_elsa(struct IsdnCardState *cs)
 {
        int bytecnt = 8;
index 689c83395693a9d2ccc3ba124f302a4597244b86..898ec0916195a9b788a4679fad5bbd3b8fe50015 100644 (file)
@@ -237,7 +237,7 @@ static void mshutdown(struct IsdnCardState *cs)
 #endif
 }
 
-inline int
+static inline int
 write_modem(struct BCState *bcs) {
        int ret=0;
        struct IsdnCardState *cs = bcs->cs;
@@ -275,7 +275,7 @@ write_modem(struct BCState *bcs) {
        return(ret);
 }
 
-inline void
+static inline void
 modem_fill(struct BCState *bcs) {
                
        if (bcs->tx_skb) {
@@ -422,7 +422,7 @@ extern int open_hscxstate(struct IsdnCardState *cs, struct BCState *bcs);
 extern void modehscx(struct BCState *bcs, int mode, int bc);
 extern void hscx_l2l1(struct PStack *st, int pr, void *arg);
 
-void
+static void
 close_elsastate(struct BCState *bcs)
 {
        modehscx(bcs, 0, bcs->channel);
@@ -442,7 +442,7 @@ close_elsastate(struct BCState *bcs)
        }
 }
 
-void
+static void
 modem_write_cmd(struct IsdnCardState *cs, u_char *buf, int len) {
        int count, fp;
        u_char *msg = buf;
@@ -472,7 +472,7 @@ modem_write_cmd(struct IsdnCardState *cs, u_char *buf, int len) {
        }
 }
 
-void
+static void
 modem_set_init(struct IsdnCardState *cs) {
        int timeout;
 
@@ -521,7 +521,7 @@ modem_set_init(struct IsdnCardState *cs) {
        udelay(RCV_DELAY);
 }
 
-void
+static void
 modem_set_dial(struct IsdnCardState *cs, int outgoing) {
        int timeout;
 #define RCV_DELAY 20000        
@@ -543,7 +543,7 @@ modem_set_dial(struct IsdnCardState *cs, int outgoing) {
        udelay(RCV_DELAY);
 }
 
-void
+static void
 modem_l2l1(struct PStack *st, int pr, void *arg)
 {
        struct BCState *bcs = st->l1.bcs;
@@ -579,7 +579,7 @@ modem_l2l1(struct PStack *st, int pr, void *arg)
        }
 }
 
-int
+static int
 setstack_elsa(struct PStack *st, struct BCState *bcs)
 {
 
@@ -614,7 +614,7 @@ setstack_elsa(struct PStack *st, struct BCState *bcs)
        return (0);
 }
 
-void
+static void
 init_modem(struct IsdnCardState *cs) {
 
        cs->bcs[0].BC_SetStack = setstack_elsa;
@@ -641,7 +641,7 @@ init_modem(struct IsdnCardState *cs) {
        modem_set_init(cs);
 }
 
-void
+static void
 release_modem(struct IsdnCardState *cs) {
 
        cs->hw.elsa.MFlag = 0;
diff --git a/drivers/isdn/hisax/enternow.h b/drivers/isdn/hisax/enternow.h
deleted file mode 100644 (file)
index ed2eec5..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 2001/10/02
- *
- * enternow.h   Header-file included by
- *              enternow_pci.c
- *
- * Author       Christoph Ersfeld <info@formula-n.de>
- *              Formula-n Europe AG (www.formula-n.com)
- *              previously Gerdes AG
- *
- *
- *              This file is (c) under GNU PUBLIC LICENSE
- */
-
-
-/* ***************************************************************************************** *
- * ****************************** datatypes and macros ************************************* *
- * ***************************************************************************************** */
-
-#define BYTE                                                   unsigned char
-#define WORD                                                   unsigned int
-#define HIBYTE(w)                                              ((unsigned char)((w & 0xff00) / 256))
-#define LOBYTE(w)                                              ((unsigned char)(w & 0x00ff))
-#define InByte(addr)                                           inb(addr)
-#define OutByte(addr,val)                                      outb(val,addr)
-
-
-
-/* ***************************************************************************************** *
- * *********************************** card-specific *************************************** *
- * ***************************************************************************************** */
-
-/* für PowerISDN PCI */
-#define TJ_AMD_IRQ                                             0x20
-#define TJ_LED1                                                0x40
-#define TJ_LED2                                                0x80
-
-
-/* Das Fenster zum AMD...
- * Ab Adresse hw.njet.base + TJ_AMD_PORT werden vom AMD jeweils 8 Bit in
- * den TigerJet i/o-Raum gemappt
- * -> 0x01 des AMD bei hw.njet.base + 0C4 */
-#define TJ_AMD_PORT                                            0xC0
-
-
-
-/* ***************************************************************************************** *
- * *************************************** Prototypen ************************************** *
- * ***************************************************************************************** */
-
-BYTE ReadByteAmd7930(struct IsdnCardState *cs, BYTE offset);
-void WriteByteAmd7930(struct IsdnCardState *cs, BYTE offset, BYTE value);
index 1cc4d11e007a00786d10b4411a6e6622aef425fa..3341cf1555312ee7e7672269373b7bdb42b55531 100644 (file)
@@ -65,7 +65,6 @@
 #include "isac.h"
 #include "isdnl1.h"
 #include "amd7930_fn.h"
-#include "enternow.h"
 #include <linux/interrupt.h>
 #include <linux/ppp_defs.h>
 #include <linux/pci.h>
 
 
 
-const char *enternow_pci_rev = "$Revision: 1.1.4.5 $";
+static const char *enternow_pci_rev = "$Revision: 1.1.4.5 $";
+
+
+/* für PowerISDN PCI */
+#define TJ_AMD_IRQ                                              0x20
+#define TJ_LED1                                                 0x40
+#define TJ_LED2                                                 0x80
+
+
+/* Das Fenster zum AMD...
+ * Ab Adresse hw.njet.base + TJ_AMD_PORT werden vom AMD jeweils 8 Bit in
+ * den TigerJet i/o-Raum gemappt
+ * -> 0x01 des AMD bei hw.njet.base + 0C4 */
+#define TJ_AMD_PORT                                             0xC0
+
 
 
 /* *************************** I/O-Interface functions ************************************* */
 
 
 /* cs->readisac, macro rByteAMD */
-BYTE
-ReadByteAmd7930(struct IsdnCardState *cs, BYTE offset)
+static unsigned char
+ReadByteAmd7930(struct IsdnCardState *cs, unsigned char offset)
 {
        /* direktes Register */
        if(offset < 8)
-               return (InByte(cs->hw.njet.isac + 4*offset));
+               return (inb(cs->hw.njet.isac + 4*offset));
 
        /* indirektes Register */
        else {
-               OutByte(cs->hw.njet.isac + 4*AMD_CR, offset);
-               return(InByte(cs->hw.njet.isac + 4*AMD_DR));
+               outb(offset, cs->hw.njet.isac + 4*AMD_CR);
+               return(inb(cs->hw.njet.isac + 4*AMD_DR));
        }
 }
 
 /* cs->writeisac, macro wByteAMD */
-void
-WriteByteAmd7930(struct IsdnCardState *cs, BYTE offset, BYTE value)
+static void
+WriteByteAmd7930(struct IsdnCardState *cs, unsigned char offset, unsigned char value)
 {
        /* direktes Register */
        if(offset < 8)
-               OutByte(cs->hw.njet.isac + 4*offset, value);
+               outb(value, cs->hw.njet.isac + 4*offset);
 
        /* indirektes Register */
        else {
-               OutByte(cs->hw.njet.isac + 4*AMD_CR, offset);
-               OutByte(cs->hw.njet.isac + 4*AMD_DR, value);
+               outb(offset, cs->hw.njet.isac + 4*AMD_CR);
+               outb(value, cs->hw.njet.isac + 4*AMD_DR);
        }
 }
 
 
-void
-enpci_setIrqMask(struct IsdnCardState *cs, BYTE val) {
+static void
+enpci_setIrqMask(struct IsdnCardState *cs, unsigned char val) {
         if (!val)
-               OutByte(cs->hw.njet.base+NETJET_IRQMASK1, 0x00);
+               outb(0x00, cs->hw.njet.base+NETJET_IRQMASK1);
         else
-               OutByte(cs->hw.njet.base+NETJET_IRQMASK1, TJ_AMD_IRQ);
+               outb(TJ_AMD_IRQ, cs->hw.njet.base+NETJET_IRQMASK1);
 }
 
 
-static BYTE dummyrr(struct IsdnCardState *cs, int chan, BYTE off)
+static unsigned char dummyrr(struct IsdnCardState *cs, int chan, unsigned char off)
 {
         return(5);
 }
 
-static void dummywr(struct IsdnCardState *cs, int chan, BYTE off, BYTE value)
+static void dummywr(struct IsdnCardState *cs, int chan, unsigned char off, unsigned char value)
 {
 
 }
@@ -142,18 +155,18 @@ reset_enpci(struct IsdnCardState *cs)
 
        /* Reset on, (also for AMD) */
        cs->hw.njet.ctrl_reg = 0x07;
-       OutByte(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg);
+       outb(cs->hw.njet.ctrl_reg, cs->hw.njet.base + NETJET_CTRL);
        mdelay(20);
        /* Reset off */
        cs->hw.njet.ctrl_reg = 0x30;
-       OutByte(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg);
+       outb(cs->hw.njet.ctrl_reg, cs->hw.njet.base + NETJET_CTRL);
        /* 20ms delay */
        mdelay(20);
        cs->hw.njet.auxd = 0;  // LED-status
        cs->hw.njet.dmactrl = 0;
-       OutByte(cs->hw.njet.base + NETJET_AUXCTRL, ~TJ_AMD_IRQ);
-       OutByte(cs->hw.njet.base + NETJET_IRQMASK1, TJ_AMD_IRQ);
-       OutByte(cs->hw.njet.auxa, cs->hw.njet.auxd); // LED off
+       outb(~TJ_AMD_IRQ, cs->hw.njet.base + NETJET_AUXCTRL);
+       outb(TJ_AMD_IRQ, cs->hw.njet.base + NETJET_IRQMASK1);
+       outb(cs->hw.njet.auxd, cs->hw.njet.auxa); // LED off
 }
 
 
@@ -161,7 +174,7 @@ static int
 enpci_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 {
        u_long flags;
-        BYTE *chan;
+        unsigned char *chan;
 
        if (cs->debug & L1_DEB_ISAC)
                debugl1(cs, "enter:now PCI: card_msg: 0x%04X", mt);
@@ -187,16 +200,16 @@ enpci_card_msg(struct IsdnCardState *cs, int mt, void *arg)
                 case MDL_ASSIGN:
                         /* TEI assigned, LED1 on */
                         cs->hw.njet.auxd = TJ_AMD_IRQ << 1;
-                        OutByte(cs->hw.njet.base + NETJET_AUXDATA, cs->hw.njet.auxd);
+                        outb(cs->hw.njet.auxd, cs->hw.njet.base + NETJET_AUXDATA);
                         break;
                 case MDL_REMOVE:
                         /* TEI removed, LEDs off */
                        cs->hw.njet.auxd = 0;
-                        OutByte(cs->hw.njet.base + NETJET_AUXDATA, 0x00);
+                        outb(0x00, cs->hw.njet.base + NETJET_AUXDATA);
                         break;
                 case MDL_BC_ASSIGN:
                         /* activate B-channel */
-                        chan = (BYTE *)arg;
+                        chan = (unsigned char *)arg;
 
                         if (cs->debug & L1_DEB_ISAC)
                                debugl1(cs, "enter:now PCI: assign phys. BC %d in AMD LMR1", *chan);
@@ -204,11 +217,11 @@ enpci_card_msg(struct IsdnCardState *cs, int mt, void *arg)
                         cs->dc.amd7930.ph_command(cs, (cs->dc.amd7930.lmr1 | (*chan + 1)), "MDL_BC_ASSIGN");
                         /* at least one b-channel in use, LED 2 on */
                         cs->hw.njet.auxd |= TJ_AMD_IRQ << 2;
-                        OutByte(cs->hw.njet.base + NETJET_AUXDATA, cs->hw.njet.auxd);
+                        outb(cs->hw.njet.auxd, cs->hw.njet.base + NETJET_AUXDATA);
                         break;
                 case MDL_BC_RELEASE:
                         /* deactivate B-channel */
-                        chan = (BYTE *)arg;
+                        chan = (unsigned char *)arg;
 
                         if (cs->debug & L1_DEB_ISAC)
                                debugl1(cs, "enter:now PCI: release phys. BC %d in Amd LMR1", *chan);
@@ -217,7 +230,7 @@ enpci_card_msg(struct IsdnCardState *cs, int mt, void *arg)
                         /* no b-channel active -> LED2 off */
                         if (!(cs->dc.amd7930.lmr1 & 3)) {
                                 cs->hw.njet.auxd &= ~(TJ_AMD_IRQ << 2);
-                                OutByte(cs->hw.njet.base + NETJET_AUXDATA, cs->hw.njet.auxd);
+                                outb(cs->hw.njet.auxd, cs->hw.njet.base + NETJET_AUXDATA);
                         }
                         break;
                 default:
@@ -231,11 +244,11 @@ static irqreturn_t
 enpci_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
        struct IsdnCardState *cs = dev_id;
-       BYTE s0val, s1val, ir;
+       unsigned char s0val, s1val, ir;
        u_long flags;
 
        spin_lock_irqsave(&cs->lock, flags);
-       s1val = InByte(cs->hw.njet.base + NETJET_IRQSTAT1);
+       s1val = inb(cs->hw.njet.base + NETJET_IRQSTAT1);
 
         /* AMD threw an interrupt */
        if (!(s1val & TJ_AMD_IRQ)) {
@@ -245,13 +258,13 @@ enpci_interrupt(int intno, void *dev_id, struct pt_regs *regs)
                s1val = 1;
        } else
                s1val = 0;
-       s0val = InByte(cs->hw.njet.base + NETJET_IRQSTAT0);
+       s0val = inb(cs->hw.njet.base + NETJET_IRQSTAT0);
        if ((s0val | s1val)==0) { // shared IRQ
                spin_unlock_irqrestore(&cs->lock, flags);
                return IRQ_NONE;
        } 
        if (s0val)
-               OutByte(cs->hw.njet.base + NETJET_IRQSTAT0, s0val);
+               outb(s0val, cs->hw.njet.base + NETJET_IRQSTAT0);
 
        /* DMA-Interrupt: B-channel-stuff */
        /* set bits in sval to indicate which page is free */
@@ -342,20 +355,20 @@ setup_enternow_pci(struct IsdnCard *card)
 
                /* Reset an */
                cs->hw.njet.ctrl_reg = 0x07;  // geändert von 0xff
-               OutByte(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg);
+               outb(cs->hw.njet.ctrl_reg, cs->hw.njet.base + NETJET_CTRL);
                /* 20 ms Pause */
                mdelay(20);
 
                cs->hw.njet.ctrl_reg = 0x30;  /* Reset Off and status read clear */
-               OutByte(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg);
+               outb(cs->hw.njet.ctrl_reg, cs->hw.njet.base + NETJET_CTRL);
                mdelay(10);
 
                cs->hw.njet.auxd = 0x00; // war 0xc0
                cs->hw.njet.dmactrl = 0;
 
-               OutByte(cs->hw.njet.base + NETJET_AUXCTRL, ~TJ_AMD_IRQ);
-               OutByte(cs->hw.njet.base + NETJET_IRQMASK1, TJ_AMD_IRQ);
-               OutByte(cs->hw.njet.auxa, cs->hw.njet.auxd);
+               outb(~TJ_AMD_IRQ, cs->hw.njet.base + NETJET_AUXCTRL);
+               outb(TJ_AMD_IRQ, cs->hw.njet.base + NETJET_IRQMASK1);
+               outb(cs->hw.njet.auxd, cs->hw.njet.auxa);
 
                break;
        }
index 24a05a43f33e35ca78d142cb1ead3bdab60cd8fe..352b45ac5347239c0911c445da6da7f66767b249 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/pci.h>
 
 extern const char *CardType[];
-const char *gazel_revision = "$Revision: 2.19.2.4 $";
+static const char *gazel_revision = "$Revision: 2.19.2.4 $";
 
 #define R647      1
 #define R685      2
@@ -317,7 +317,8 @@ gazel_interrupt_ipac(int intno, void *dev_id, struct pt_regs *regs)
        spin_unlock_irqrestore(&cs->lock, flags);
        return IRQ_HANDLED;
 }
-void
+
+static void
 release_io_gazel(struct IsdnCardState *cs)
 {
        unsigned int i;
index ba1d028343ecd8e869a39d971d6a5d27e74b94e5..6e7e060716b7b071a478f9f62c3774d767f8778a 100644 (file)
@@ -1358,7 +1358,7 @@ chipreset(hfc4s8s_hw * hw)
 /********************************************/
 /* disable/enable hardware in nt or te mode */
 /********************************************/
-void
+static void
 hfc_hardware_enable(hfc4s8s_hw * hw, int enable, int nt_mode)
 {
        u_long flags;
index ebea3feef003ad0e9f4008573fc67ca6ad6fc1ec..7cf87793e7907d5bdf4d354a1fc4011cce151ad6 100644 (file)
@@ -345,7 +345,7 @@ hfc_send_data(struct BCState *bcs)
                debugl1(cs,"send_data %d blocked", bcs->channel);
 }
 
-void
+static void
 main_rec_2bds0(struct BCState *bcs)
 {
        struct IsdnCardState *cs = bcs->cs;
@@ -399,7 +399,7 @@ main_rec_2bds0(struct BCState *bcs)
        return;
 }
 
-void
+static void
 mode_2bs0(struct BCState *bcs, int mode, int bc)
 {
        struct IsdnCardState *cs = bcs->cs;
@@ -505,7 +505,7 @@ hfc_l2l1(struct PStack *st, int pr, void *arg)
        }
 }
 
-void
+static void
 close_2bs0(struct BCState *bcs)
 {
        mode_2bs0(bcs, 0, bcs->channel);
@@ -534,7 +534,7 @@ open_hfcstate(struct IsdnCardState *cs, struct BCState *bcs)
        return (0);
 }
 
-int
+static int
 setstack_2b(struct PStack *st, struct BCState *bcs)
 {
        bcs->channel = st->l1.bc;
@@ -1004,7 +1004,7 @@ HFCD_l1hw(struct PStack *st, int pr, void *arg)
        }
 }
 
-void
+static void
 setstack_hfcd(struct PStack *st, struct IsdnCardState *cs)
 {
        st->l1.l1hw = HFCD_l1hw;
@@ -1015,7 +1015,7 @@ hfc_dbusy_timer(struct IsdnCardState *cs)
 {
 }
 
-unsigned int __init
+static unsigned int __init
 *init_send_hfcd(int cnt)
 {
        int i, *send;
index bb376f39ac89d9b06e3c0d76828a8c5aa6f1565a..f978a5af866292489ceb58b267219c5a3b86b32e 100644 (file)
@@ -52,7 +52,7 @@ WaitNoBusy(struct IsdnCardState *cs)
                return (to);
 }
 
-int
+static int
 GetFreeFifoBytes(struct BCState *bcs)
 {
        int s;
@@ -66,7 +66,7 @@ GetFreeFifoBytes(struct BCState *bcs)
        return (s);
 }
 
-int
+static int
 ReadZReg(struct BCState *bcs, u_char reg)
 {
        int val;
@@ -394,7 +394,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 +507,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 +537,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 +551,7 @@ setstack_hfc(struct PStack *st, struct BCState *bcs)
        return (0);
 }
 
-void __init
+static void __init
 init_send(struct BCState *bcs)
 {
        int i;
index c2db52696a86bb2350261556116877aa1fe8e06c..8337b0f26cc40183e0846c683bbd43797f4a97bf 100644 (file)
@@ -70,7 +70,7 @@ static const PCI_ENTRY id_list[] =
 /******************************************/
 /* free hardware resources used by driver */
 /******************************************/
-void
+static void
 release_io_hfcpci(struct IsdnCardState *cs)
 {
        printk(KERN_INFO "HiSax: release hfcpci at %p\n",
@@ -394,7 +394,7 @@ receive_dmsg(struct IsdnCardState *cs)
 /*******************************************************************************/
 /* check for transparent receive data and read max one threshold size if avail */
 /*******************************************************************************/
-int
+static int
 hfcpci_empty_fifo_trans(struct BCState *bcs, bzfifo_type * bz, u_char * bdata)
 {
        unsigned short *z1r, *z2r;
@@ -446,7 +446,7 @@ hfcpci_empty_fifo_trans(struct BCState *bcs, bzfifo_type * bz, u_char * bdata)
 /**********************************/
 /* B-channel main receive routine */
 /**********************************/
-void
+static void
 main_rec_hfcpci(struct BCState *bcs)
 {
        struct IsdnCardState *cs = bcs->cs;
@@ -1244,7 +1244,7 @@ HFCPCI_l1hw(struct PStack *st, int pr, void *arg)
 /***********************************************/
 /* called during init setting l1 stack pointer */
 /***********************************************/
-void
+static void
 setstack_hfcpci(struct PStack *st, struct IsdnCardState *cs)
 {
        st->l1.l1hw = HFCPCI_l1hw;
@@ -1268,7 +1268,7 @@ hfcpci_send_data(struct BCState *bcs)
 /***************************************************************/
 /* activate/deactivate hardware for selected channels and mode */
 /***************************************************************/
-void
+static void
 mode_hfcpci(struct BCState *bcs, int mode, int bc)
 {
        struct IsdnCardState *cs = bcs->cs;
@@ -1579,7 +1579,7 @@ hfcpci_bh(struct IsdnCardState *cs)
 /********************************/
 /* called for card init message */
 /********************************/
-void __init
+static void __init
 inithfcpci(struct IsdnCardState *cs)
 {
        cs->bcs[0].BC_SetStack = setstack_2b;
index 4df036ed1af0aa9d5816574d94ef2c0385c429d2..9ef2981e404ed5ba96f87080295eacf3bf46857a 100644 (file)
@@ -232,5 +232,4 @@ typedef union {
 #define Read_hfc(a,b) (*(((u_char *)a->hw.hfcpci.pci_io)+b))
 
 extern void main_irq_hcpci(struct BCState *bcs);
-extern void inithfcpci(struct IsdnCardState *cs);
 extern void releasehfcpci(struct IsdnCardState *cs);
index a307fcb6c6349304dbd163ca300b736bd15ea72c..f27c1608a3a706ba482d4163b0f67c2393e9dedd 100644 (file)
@@ -308,7 +308,7 @@ read_fifo(struct IsdnCardState *cs, u_char fifo, int trans_max)
 /******************************************/
 /* free hardware resources used by driver */
 /******************************************/
-void
+static void
 release_io_hfcsx(struct IsdnCardState *cs)
 {
        cs->hw.hfcsx.int_m2 = 0;        /* interrupt output off ! */
@@ -472,7 +472,7 @@ receive_dmsg(struct IsdnCardState *cs)
 /**********************************/
 /* B-channel main receive routine */
 /**********************************/
-void
+static void
 main_rec_hfcsx(struct BCState *bcs)
 {
        struct IsdnCardState *cs = bcs->cs;
@@ -1003,7 +1003,7 @@ HFCSX_l1hw(struct PStack *st, int pr, void *arg)
 /***********************************************/
 /* called during init setting l1 stack pointer */
 /***********************************************/
-void
+static void
 setstack_hfcsx(struct PStack *st, struct IsdnCardState *cs)
 {
        st->l1.l1hw = HFCSX_l1hw;
@@ -1027,7 +1027,7 @@ hfcsx_send_data(struct BCState *bcs)
 /***************************************************************/
 /* activate/deactivate hardware for selected channels and mode */
 /***************************************************************/
-void
+static void
 mode_hfcsx(struct BCState *bcs, int mode, int bc)
 {
        struct IsdnCardState *cs = bcs->cs;
@@ -1328,7 +1328,7 @@ hfcsx_bh(struct IsdnCardState *cs)
 /********************************/
 /* called for card init message */
 /********************************/
-void __devinit
+static void __devinit
 inithfcsx(struct IsdnCardState *cs)
 {
        cs->setstack_d = setstack_hfcsx;
index 12f54159344aa3ad7970052b89177462250e58f1..6792f13dc22011f3b57a3da96b793f280e8a9bbc 100644 (file)
@@ -193,5 +193,4 @@ struct hfcsx_extra {
 };
 
 extern void main_irq_hfcsx(struct BCState *bcs);
-extern void inithfcsx(struct IsdnCardState *cs);
 extern void releasehfcsx(struct IsdnCardState *cs);
index ffd74b84f502e0f999b2c40725de5aabf8331320..e2c3af49d72b9af938d47fd109924d74e7c84949 100644 (file)
@@ -60,7 +60,7 @@ static const char *hfcusb_revision =
 #include "hisax_debug.h"
 static u_int debug;
 module_param(debug, uint, 0);
-int hfc_debug;
+static int hfc_debug;
 #endif
 
 
@@ -85,7 +85,7 @@ static struct usb_device_id hfc_usb_idtab[] = {
 *   VendorID, ProductID, Devicename, LED_SCHEME,
 *   LED's BitMask in HFCUSB_P_DATA Register : LED_USB, LED_S0, LED_B1, LED_B2
 */
-vendor_data vdata[] = {
+static vendor_data vdata[] = {
        /* CologneChip Eval TA */
        {0x0959, 0x2bd0, "ISDN USB TA (Cologne Chip HFC-S USB based)",
         LED_OFF, {4, 0, 2, 1}
@@ -1137,7 +1137,7 @@ set_hfcmode(hfcusb_data * hfc, int channel, int mode)
        }
 }
 
-void
+static void
 hfc_usb_l2l1(struct hisax_if *my_hisax_if, int pr, void *arg)
 {
        usb_fifo *fifo = my_hisax_if->priv;
index b171600cf641273b039aeefe0d505a15e66039fc..280dd29b30d6fbd0efaaf0f715a15637ab759b49 100644 (file)
@@ -168,7 +168,7 @@ static struct hfcusb_symbolic_list urb_errlist[] = {
 * 3 entries are the configuration number, the minimum interval for
 * Interrupt endpoints & boolean if E-channel logging possible
 */
-int validconf[][19] = {
+static int validconf[][19] = {
        // INT in, ISO out config
        {EP_NUL, EP_INT, EP_NUL, EP_INT, EP_NUL, EP_INT, EP_NOP, EP_INT,
         EP_ISO, EP_NUL, EP_ISO, EP_NUL, EP_ISO, EP_NUL, EP_NUL, EP_NUL,
@@ -187,7 +187,7 @@ int validconf[][19] = {
 };
 
 // string description of chosen config
-char *conf_str[] = {
+static char *conf_str[] = {
        "4 Interrupt IN + 3 Isochron OUT",
        "3 Interrupt IN + 3 Isochron OUT",
        "4 Isochron IN + 3 Isochron OUT",
index 6fc55fea17029bb70428d8231a4e66662b1f931c..86ab1c13f6b15e7ab56f11aed977247809fd2f85 100644 (file)
@@ -52,7 +52,7 @@ hfcs_Timer(struct IsdnCardState *cs)
 */
 }
 
-void
+static void
 release_io_hfcs(struct IsdnCardState *cs)
 {
        release2bds0(cs);
index dc5791728d537f8311b7ba69cffc6bc4934aea6d..17cf7663c58233fda3610b9890d2e663254ba643 100644 (file)
@@ -1271,7 +1271,6 @@ extern void Logl2Frame(struct IsdnCardState *cs, struct sk_buff *skb, char *buf,
 void init_bcstate(struct IsdnCardState *cs, int bc);
 
 void setstack_HiSax(struct PStack *st, struct IsdnCardState *cs);
-unsigned int random_ri(void);
 void HiSax_addlist(struct IsdnCardState *sp, struct PStack *st);
 void HiSax_rmlist(struct IsdnCardState *sp, struct PStack *st);
 
@@ -1315,15 +1314,11 @@ int QuickHex(char *txt, u_char * p, int cnt);
 void LogFrame(struct IsdnCardState *cs, u_char * p, int size);
 void dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir);
 void iecpy(u_char * dest, u_char * iestart, int ieoffset);
-#ifdef ISDN_CHIP_ISAC
-void setstack_isac(struct PStack *st, struct IsdnCardState *cs);
-#endif /* ISDN_CHIP_ISAC */
 #endif /* __KERNEL__ */
 
 #define HZDELAY(jiffs) {int tout = jiffs; while (tout--) udelay(1000000/HZ);}
 
 int ll_run(struct IsdnCardState *cs, int addfeatures);
-void ll_stop(struct IsdnCardState *cs);
 int CallcNew(void);
 void CallcFree(void);
 int CallcNewChan(struct IsdnCardState *cs);
index 5bbbe3e951250708dbf6acd62fe2057101a27434..66dbaee77bfbd005ecd5db41b32e4cd459bec8c3 100644 (file)
@@ -151,7 +151,7 @@ hscx_l2l1(struct PStack *st, int pr, void *arg)
        }
 }
 
-void
+static void
 close_hscxstate(struct BCState *bcs)
 {
        modehscx(bcs, 0, bcs->channel);
@@ -203,7 +203,7 @@ open_hscxstate(struct IsdnCardState *cs, struct BCState *bcs)
        return (0);
 }
 
-int
+static int
 setstack_hscx(struct PStack *st, struct BCState *bcs)
 {
        bcs->channel = st->l1.bc;
index dcf31f83c6000da39c2bd84cd888ad12b6bcb942..b4ca5859b1777cb1e99f88f7fb95714644a845ee 100644 (file)
@@ -108,7 +108,7 @@ icc_bh(struct IsdnCardState *cs)
 #endif
 }
 
-void
+static void
 icc_empty_fifo(struct IsdnCardState *cs, int count)
 {
        u_char *ptr;
@@ -563,13 +563,13 @@ ICC_l1hw(struct PStack *st, int pr, void *arg)
        }
 }
 
-void
+static void
 setstack_icc(struct PStack *st, struct IsdnCardState *cs)
 {
        st->l1.l1hw = ICC_l1hw;
 }
 
-void 
+static void
 DC_Close_icc(struct IsdnCardState *cs) {
        if (cs->dc.icc.mon_rx) {
                kfree(cs->dc.icc.mon_rx);
index 6485e232d86936f728ebb70be5957f929f654cdb..efba2f44801797f726f30c6033b14dfc3d65611a 100644 (file)
@@ -36,8 +36,6 @@ static void ph_command(struct IsdnCardState *cs, unsigned int command);
 static inline void cic_int(struct IsdnCardState *cs);
 static void dch_l2l1(struct PStack *st, int pr, void *arg);
 static void dbusy_timer_handler(struct IsdnCardState *cs);
-static void ipacx_new_ph(struct IsdnCardState *cs);
-static void dch_bh(struct IsdnCardState *cs);
 static void dch_empty_fifo(struct IsdnCardState *cs, int count);
 static void dch_fill_fifo(struct IsdnCardState *cs);
 static inline void dch_int(struct IsdnCardState *cs);
@@ -231,81 +229,6 @@ dbusy_timer_handler(struct IsdnCardState *cs)
        }
 }
 
-//----------------------------------------------------------
-// L1 state machine intermediate layer to isdnl1 module
-//----------------------------------------------------------
-static void
-ipacx_new_ph(struct IsdnCardState *cs)
-{
-       switch (cs->dc.isac.ph_state) {
-               case (IPACX_IND_RES):
-                       ph_command(cs, IPACX_CMD_DI);
-                       l1_msg(cs, HW_RESET | INDICATION, NULL);
-                       break;
-      
-               case (IPACX_IND_DC):
-                       l1_msg(cs, HW_DEACTIVATE | CONFIRM, NULL);
-                       break;
-      
-               case (IPACX_IND_DR):
-                       l1_msg(cs, HW_DEACTIVATE | INDICATION, NULL);
-                       break;
-      
-               case (IPACX_IND_PU):
-                       l1_msg(cs, HW_POWERUP | CONFIRM, NULL);
-                       break;
-
-               case (IPACX_IND_RSY):
-                       l1_msg(cs, HW_RSYNC | INDICATION, NULL);
-                       break;
-
-               case (IPACX_IND_AR):
-                       l1_msg(cs, HW_INFO2 | INDICATION, NULL);
-                       break;
-      
-               case (IPACX_IND_AI8):
-                       l1_msg(cs, HW_INFO4_P8 | INDICATION, NULL);
-                       break;
-      
-               case (IPACX_IND_AI10):
-                       l1_msg(cs, HW_INFO4_P10 | INDICATION, NULL);
-                       break;
-      
-               default:
-                       break;
-       }
-}
-
-//----------------------------------------------------------
-// bottom half handler for D channel
-//----------------------------------------------------------
-static void
-dch_bh(struct IsdnCardState *cs)
-{
-       struct PStack *st;
-       
-       if (!cs) return;
-  
-       if (test_and_clear_bit(D_CLEARBUSY, &cs->event)) {
-               if (cs->debug) debugl1(cs, "D-Channel Busy cleared");
-               for (st = cs->stlist; st; st = st->next) {
-                       st->l1.l1l2(st, PH_PAUSE | CONFIRM, NULL);
-               }
-       }
-  
-       if (test_and_clear_bit(D_RCVBUFREADY, &cs->event)) {
-               DChannel_proc_rcv(cs);
-  }  
-  
-       if (test_and_clear_bit(D_XMTBUFREADY, &cs->event)) {
-               DChannel_proc_xmt(cs);
-  }  
-  
-       if (test_and_clear_bit(D_L1STATECHANGE, &cs->event)) {
-    ipacx_new_ph(cs);
-  }  
-}
-
 //----------------------------------------------------------
 // Fill buffer from receive FIFO
 //----------------------------------------------------------
@@ -991,14 +914,5 @@ init_ipacx(struct IsdnCardState *cs, int part)
        }
 }
 
-
-void __devinit
-setup_ipacx(struct IsdnCardState *cs)
-{
-       INIT_WORK(&cs->tqueue, (void *)(void *) dch_bh, cs);
-       cs->dbusytimer.function = (void *) dbusy_timer_handler;
-       cs->dbusytimer.data = (long) cs;
-       init_timer(&cs->dbusytimer);
-}
 //----------------- end of file -----------------------
 
index 20b9499529528c6d8cfa37ca7c1eda643ab613e0..85e063a08d23e3410215e8c519a729b59a5352de 100644 (file)
@@ -112,7 +112,7 @@ isac_bh(struct IsdnCardState *cs)
 #endif
 }
 
-void
+static void
 isac_empty_fifo(struct IsdnCardState *cs, int count)
 {
        u_char *ptr;
@@ -563,13 +563,13 @@ ISAC_l1hw(struct PStack *st, int pr, void *arg)
        }
 }
 
-void
+static void
 setstack_isac(struct PStack *st, struct IsdnCardState *cs)
 {
        st->l1.l1hw = ISAC_l1hw;
 }
 
-void 
+static void
 DC_Close_isac(struct IsdnCardState *cs) {
        if (cs->dc.isac.mon_rx) {
                kfree(cs->dc.isac.mon_rx);
index ee081321efb25e6e9741ded87490ac0bc6dab641..642a87c51295c70055509678fa71a370a766f9f2 100644 (file)
 #define ETX    0x03
 
 #define FAXMODCNT      13
-const  u_char  faxmodulation[] = {3,24,48,72,73,74,96,97,98,121,122,145,146};
+static const   u_char  faxmodulation[] = {3,24,48,72,73,74,96,97,98,121,122,145,146};
 static u_int   modmask = 0x1fff;
 static int     frm_extra_delay = 2;
 static int     para_TOA = 6;
-const   u_char  *FC1_CMD[] = {"FAE", "FTS", "FRS", "FTM", "FRM", "FTH", "FRH", "CTRL" };
+static const   u_char  *FC1_CMD[] = {"FAE", "FTS", "FRS", "FTM", "FRM", "FTH", "FRH", "CTRL" };
 
-void isar_setup(struct IsdnCardState *cs);
+static void isar_setup(struct IsdnCardState *cs);
 static void isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para);
 static void ll_deliver_faxstat(struct BCState *bcs, u_char status);
 
@@ -45,7 +45,7 @@ waitforHIA(struct IsdnCardState *cs, int timeout)
 }
 
 
-int
+static int
 sendmsg(struct IsdnCardState *cs, u_char his, u_char creg, u_char len,
        u_char *msg)
 {
@@ -85,7 +85,7 @@ sendmsg(struct IsdnCardState *cs, u_char his, u_char creg, u_char len,
 }
 
 /* Call only with IRQ disabled !!! */
-inline void
+static inline void
 rcv_mbox(struct IsdnCardState *cs, struct isar_reg *ireg, u_char *msg)
 {
        int i;
@@ -114,7 +114,7 @@ rcv_mbox(struct IsdnCardState *cs, struct isar_reg *ireg, u_char *msg)
 }
 
 /* Call only with IRQ disabled !!! */
-inline void
+static inline void
 get_irq_infos(struct IsdnCardState *cs, struct isar_reg *ireg)
 {
        ireg->iis = cs->BC_Read_Reg(cs, 1, ISAR_IIS);
@@ -127,7 +127,7 @@ get_irq_infos(struct IsdnCardState *cs, struct isar_reg *ireg)
 #endif
 }
 
-int
+static int
 waitrecmsg(struct IsdnCardState *cs, u_char *len,
        u_char *msg, int maxdelay)
 {
@@ -185,7 +185,7 @@ ISARVersion(struct IsdnCardState *cs, char *s)
        return(ver);
 }
 
-int
+static int
 isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf)
 {
        int ret, size, cnt, debug;
@@ -739,7 +739,7 @@ isar_fill_fifo(struct BCState *bcs)
        }
 }
 
-inline
+static inline
 struct BCState *sel_bcs_isar(struct IsdnCardState *cs, u_char dpath)
 {
        if ((!dpath) || (dpath == 3))
@@ -751,7 +751,7 @@ struct BCState *sel_bcs_isar(struct IsdnCardState *cs, u_char dpath)
        return(NULL);
 }
 
-void
+static void
 send_frames(struct BCState *bcs)
 {
        if (bcs->tx_skb) {
@@ -806,7 +806,7 @@ send_frames(struct BCState *bcs)
        }
 }
 
-inline void
+static inline void
 check_send(struct IsdnCardState *cs, u_char rdm)
 {
        struct BCState *bcs;
@@ -828,11 +828,13 @@ check_send(struct IsdnCardState *cs, u_char rdm)
        
 }
 
-const char *dmril[] = {"NO SPEED", "1200/75", "NODEF2", "75/1200", "NODEF4",
-                       "300", "600", "1200", "2400", "4800", "7200",
-                       "9600nt", "9600t", "12000", "14400", "WRONG"};
-const char *dmrim[] = {"NO MOD", "NO DEF", "V32/V32b", "V22", "V21",
-                       "Bell103", "V23", "Bell202", "V17", "V29", "V27ter"};
+static const char *dmril[] = {"NO SPEED", "1200/75", "NODEF2", "75/1200",
+                               "NODEF4", "300", "600", "1200", "2400",
+                               "4800", "7200", "9600nt", "9600t", "12000",
+                               "14400", "WRONG"};
+static const char *dmrim[] = {"NO MOD", "NO DEF", "V32/V32b", "V22", "V21",
+                               "Bell103", "V23", "Bell202", "V17", "V29",
+                               "V27ter"};
 
 static void
 isar_pump_status_rsp(struct BCState *bcs, struct isar_reg *ireg) {
@@ -1388,7 +1390,7 @@ setup_iom2(struct BCState *bcs) {
        udelay(1000);
 }
 
-int
+static int
 modeisar(struct BCState *bcs, int mode, int bc)
 {
        struct IsdnCardState *cs = bcs->cs;
@@ -1562,7 +1564,7 @@ isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para)
                sendmsg(cs, dps | ISAR_HIS_PUMPCTRL, ctrl, nom, &p1);
 }
 
-void
+static void
 isar_setup(struct IsdnCardState *cs)
 {
        u_char msg;
@@ -1582,7 +1584,7 @@ isar_setup(struct IsdnCardState *cs)
        }
 }
 
-void
+static void
 isar_l2l1(struct PStack *st, int pr, void *arg)
 {
        struct BCState *bcs = st->l1.bcs;
@@ -1681,7 +1683,7 @@ isar_l2l1(struct PStack *st, int pr, void *arg)
        }
 }
 
-void
+static void
 close_isarstate(struct BCState *bcs)
 {
        modeisar(bcs, 0, bcs->channel);
@@ -1703,7 +1705,7 @@ close_isarstate(struct BCState *bcs)
        del_timer(&bcs->hw.isar.ftimer);
 }
 
-int
+static int
 open_isarstate(struct IsdnCardState *cs, struct BCState *bcs)
 {
        if (!test_and_set_bit(BC_FLG_INIT, &bcs->Flag)) {
@@ -1725,7 +1727,7 @@ open_isarstate(struct IsdnCardState *cs, struct BCState *bcs)
        return (0);
 }
 
-int
+static int
 setstack_isar(struct PStack *st, struct BCState *bcs)
 {
        bcs->channel = st->l1.bc;
index 4d08d27f14995bf20a0c9da4261d7b479421fcb4..ac899503a74f1ee49b117de3b0d12d670a5a7ab0 100644 (file)
@@ -151,7 +151,7 @@ l1m_debug(struct FsmInst *fi, char *fmt, ...)
        va_end(args);
 }
 
-void
+static void
 L1activated(struct IsdnCardState *cs)
 {
        struct PStack *st;
@@ -166,7 +166,7 @@ L1activated(struct IsdnCardState *cs)
        }
 }
 
-void
+static void
 L1deactivated(struct IsdnCardState *cs)
 {
        struct PStack *st;
@@ -370,7 +370,7 @@ init_bcstate(struct IsdnCardState *cs, int bc)
 
 #ifdef L2FRAME_DEBUG           /* psa */
 
-char *
+static char *
 l2cmd(u_char cmd)
 {
        switch (cmd & ~0x10) {
@@ -404,7 +404,7 @@ l2cmd(u_char cmd)
 
 static char tmpdeb[32];
 
-char *
+static char *
 l2frames(u_char * ptr)
 {
        switch (ptr[2] & ~0x10) {
index d311b5fbf895014f1b529e0f4cb67fc309918609..9022583fd6a06e97b76a6c44dddcc0b7d7eacf8b 100644 (file)
@@ -142,7 +142,7 @@ freewin1(struct Layer2 *l2)
        return cnt;
 }
 
-inline void
+static inline void
 freewin(struct PStack *st)
 {
        freewin1(&st->l2);
@@ -157,7 +157,7 @@ ReleaseWin(struct Layer2 *l2)
                printk(KERN_WARNING "isdl2 freed %d skbuffs in release\n", cnt);
 }
 
-inline unsigned int
+static inline unsigned int
 cansend(struct PStack *st)
 {
        unsigned int p1;
@@ -169,7 +169,7 @@ cansend(struct PStack *st)
        return ((p1 < st->l2.window) && !test_bit(FLG_PEER_BUSY, &st->l2.flag));
 }
 
-inline void
+static inline void
 clear_exception(struct Layer2 *l2)
 {
        test_and_clear_bit(FLG_ACK_PEND, &l2->flag);
@@ -178,7 +178,7 @@ clear_exception(struct Layer2 *l2)
        clear_peer_busy(l2);
 }
 
-inline int
+static inline int
 l2headersize(struct Layer2 *l2, int ui)
 {
        return (((test_bit(FLG_MOD128, &l2->flag) && (!ui)) ? 2 : 1) +
@@ -223,40 +223,31 @@ enqueue_super(struct PStack *st,
 
 #define enqueue_ui(a, b) enqueue_super(a, b)
 
-inline int
+static inline int
 IsUI(u_char * data)
 {
        return ((data[0] & 0xef) == UI);
 }
 
-inline int
+static inline int
 IsUA(u_char * data)
 {
        return ((data[0] & 0xef) == UA);
 }
 
-inline int
+static inline int
 IsDM(u_char * data)
 {
        return ((data[0] & 0xef) == DM);
 }
 
-inline int
+static inline int
 IsDISC(u_char * data)
 {
        return ((data[0] & 0xef) == DISC);
 }
 
-inline int
-IsRR(u_char * data, struct PStack *st)
-{
-       if (test_bit(FLG_MOD128, &st->l2.flag))
-               return (data[0] == RR);
-       else
-               return ((data[0] & 0xf) == 1);
-}
-
-inline int
+static inline int
 IsSFrame(u_char * data, struct PStack *st)
 {
        register u_char d = *data;
@@ -266,7 +257,7 @@ IsSFrame(u_char * data, struct PStack *st)
        return(((d & 0xf3) == 1) && ((d & 0x0c) != 0x0c));
 }
 
-inline int
+static inline int
 IsSABME(u_char * data, struct PStack *st)
 {
        u_char d = data[0] & ~0x10;
@@ -274,25 +265,25 @@ IsSABME(u_char * data, struct PStack *st)
        return (test_bit(FLG_MOD128, &st->l2.flag) ? d == SABME : d == SABM);
 }
 
-inline int
+static inline int
 IsREJ(u_char * data, struct PStack *st)
 {
        return (test_bit(FLG_MOD128, &st->l2.flag) ? data[0] == REJ : (data[0] & 0xf) == REJ);
 }
 
-inline int
+static inline int
 IsFRMR(u_char * data)
 {
        return ((data[0] & 0xef) == FRMR);
 }
 
-inline int
+static inline int
 IsRNR(u_char * data, struct PStack *st)
 {
        return (test_bit(FLG_MOD128, &st->l2.flag) ? data[0] == RNR : (data[0] & 0xf) == RNR);
 }
 
-int
+static int
 iframe_error(struct PStack *st, struct sk_buff *skb)
 {
        int i = l2addrsize(&st->l2) + (test_bit(FLG_MOD128, &st->l2.flag) ? 2 : 1);
@@ -315,7 +306,7 @@ iframe_error(struct PStack *st, struct sk_buff *skb)
        return 0;
 }
 
-int
+static int
 super_error(struct PStack *st, struct sk_buff *skb)
 {
        if (skb->len != l2addrsize(&st->l2) +
@@ -325,7 +316,7 @@ super_error(struct PStack *st, struct sk_buff *skb)
        return 0;
 }
 
-int
+static int
 unnum_error(struct PStack *st, struct sk_buff *skb, int wantrsp)
 {
        int rsp = (*skb->data & 0x2) >> 1;
@@ -341,7 +332,7 @@ unnum_error(struct PStack *st, struct sk_buff *skb, int wantrsp)
        return 0;
 }
 
-int
+static int
 UI_error(struct PStack *st, struct sk_buff *skb)
 {
        int rsp = *skb->data & 0x2;
@@ -357,7 +348,7 @@ UI_error(struct PStack *st, struct sk_buff *skb)
        return 0;
 }
 
-int
+static int
 FRMR_error(struct PStack *st, struct sk_buff *skb)
 {
        int headers = l2addrsize(&st->l2) + 1;
@@ -444,51 +435,44 @@ send_uframe(struct PStack *st, u_char cmd, u_char cr)
        enqueue_super(st, skb);
 }
 
-inline u_char
+static inline u_char
 get_PollFlag(struct PStack * st, struct sk_buff * skb)
 {
        return (skb->data[l2addrsize(&(st->l2))] & 0x10);
 }
 
-inline void
-FreeSkb(struct sk_buff *skb)
-{
-       dev_kfree_skb(skb);
-}
-
-
-inline u_char
+static inline u_char
 get_PollFlagFree(struct PStack *st, struct sk_buff *skb)
 {
        u_char PF;
 
        PF = get_PollFlag(st, skb);
-       FreeSkb(skb);
+       dev_kfree_skb(skb);
        return (PF);
 }
 
-inline void
+static inline void
 start_t200(struct PStack *st, int i)
 {
        FsmAddTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, i);
        test_and_set_bit(FLG_T200_RUN, &st->l2.flag);
 }
 
-inline void
+static inline void
 restart_t200(struct PStack *st, int i)
 {
        FsmRestartTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, i);
        test_and_set_bit(FLG_T200_RUN, &st->l2.flag);
 }
 
-inline void
+static inline void
 stop_t200(struct PStack *st, int i)
 {
        if(test_and_clear_bit(FLG_T200_RUN, &st->l2.flag))
                FsmDelTimer(&st->l2.t200, i);
 }
 
-inline void
+static inline void
 st5_dl_release_l2l3(struct PStack *st)
 {
                int pr;
@@ -501,7 +485,7 @@ st5_dl_release_l2l3(struct PStack *st)
                st->l2.l2l3(st, pr, NULL);
 }
 
-inline void
+static inline void
 lapb_dl_release_l2l3(struct PStack *st, int f)
 {
                if (test_bit(FLG_LAPB, &st->l2.flag))
@@ -802,7 +786,7 @@ l2_connected(struct FsmInst *fi, int event, void *arg)
                l2_mdl_error_ua(fi, event, arg);
                return;
        }
-       FreeSkb(skb);
+       dev_kfree_skb(skb);
 
        if (test_and_clear_bit(FLG_PEND_REL, &st->l2.flag))
                l2_disconnect(fi, event, arg);
@@ -840,7 +824,7 @@ l2_released(struct FsmInst *fi, int event, void *arg)
                l2_mdl_error_ua(fi, event, arg);
                return;
        }
-       FreeSkb(skb);
+       dev_kfree_skb(skb);
 
        stop_t200(st, 6);
        lapb_dl_release_l2l3(st, CONFIRM);
@@ -889,7 +873,7 @@ l2_st6_dm_release(struct FsmInst *fi, int event, void *arg)
        }
 }
 
-inline void
+static inline void
 enquiry_cr(struct PStack *st, u_char typ, u_char cr, u_char pf)
 {
        struct sk_buff *skb;
@@ -912,7 +896,7 @@ enquiry_cr(struct PStack *st, u_char typ, u_char cr, u_char pf)
        enqueue_super(st, skb);
 }
 
-inline void
+static inline void
 enquiry_response(struct PStack *st)
 {
        if (test_bit(FLG_OWN_BUSY, &st->l2.flag))
@@ -922,7 +906,7 @@ enquiry_response(struct PStack *st)
        test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag);
 }
 
-inline void
+static inline void
 transmit_enquiry(struct PStack *st)
 {
        if (test_bit(FLG_OWN_BUSY, &st->l2.flag))
@@ -1004,7 +988,7 @@ l2_st7_got_super(struct FsmInst *fi, int event, void *arg)
                PollFlag = (skb->data[0] & 0x10);
                nr = (skb->data[0] >> 5) & 0x7;
        }
-       FreeSkb(skb);
+       dev_kfree_skb(skb);
 
        if (PollFlag) {
                if (rsp)
@@ -1047,7 +1031,7 @@ l2_feed_i_if_reest(struct FsmInst *fi, int event, void *arg)
        if (!test_bit(FLG_L3_INIT, &st->l2.flag))
                skb_queue_tail(&st->l2.i_queue, skb);
        else
-               FreeSkb(skb);
+               dev_kfree_skb(skb);
 }
 
 static void
@@ -1093,7 +1077,7 @@ l2_got_iframe(struct FsmInst *fi, int event, void *arg)
                nr = (skb->data[i] >> 5) & 0x7;
        }
        if (test_bit(FLG_OWN_BUSY, &l2->flag)) {
-               FreeSkb(skb);
+               dev_kfree_skb(skb);
                if(PollFlag) enquiry_response(st);
        } else if (l2->vr == ns) {
                (l2->vr)++;
@@ -1111,7 +1095,7 @@ l2_got_iframe(struct FsmInst *fi, int event, void *arg)
                st->l2.l2l3(st, DL_DATA | INDICATION, skb);
        } else {
                /* n(s)!=v(r) */
-               FreeSkb(skb);
+               dev_kfree_skb(skb);
                if (test_and_set_bit(FLG_REJEXC, &l2->flag)) {
                        if (PollFlag)
                                enquiry_response(st);
@@ -1309,7 +1293,7 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
                skb = alloc_skb(oskb->len + i, GFP_ATOMIC);
                memcpy(skb_put(skb, i), header, i);
                memcpy(skb_put(skb, oskb->len), oskb->data, oskb->len);
-               FreeSkb(oskb);
+               dev_kfree_skb(oskb);
        }
        st->l2.l2l1(st, PH_PULL | INDICATION, skb);
        test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag);
@@ -1349,7 +1333,7 @@ l2_st8_got_super(struct FsmInst *fi, int event, void *arg)
                PollFlag = (skb->data[0] & 0x10);
                nr = (skb->data[0] >> 5) & 0x7;
        }
-       FreeSkb(skb);
+       dev_kfree_skb(skb);
 
        if (rsp && PollFlag) {
                if (legalnr(st, nr)) {
@@ -1391,7 +1375,7 @@ l2_got_FRMR(struct FsmInst *fi, int event, void *arg)
                establishlink(fi);
                test_and_clear_bit(FLG_L3_INIT, &st->l2.flag);
        }
-       FreeSkb(skb);
+       dev_kfree_skb(skb);
 }
 
 static void
@@ -1655,7 +1639,7 @@ isdnl2_l1l2(struct PStack *st, int pr, void *arg)
                                datap += len;
                        else {
                                FsmEvent(&st->l2.l2m, EV_L2_FRAME_ERROR, (void *) 'N');
-                               FreeSkb(skb);
+                               dev_kfree_skb(skb);
                                return;
                        }
                        if (!(*datap & 1)) {    /* I-Frame */
@@ -1684,16 +1668,16 @@ isdnl2_l1l2(struct PStack *st, int pr, void *arg)
                                        ret = FsmEvent(&st->l2.l2m, EV_L2_FRMR, skb);
                        } else {
                                FsmEvent(&st->l2.l2m, EV_L2_FRAME_ERROR, (void *) 'L');
-                               FreeSkb(skb);
+                               dev_kfree_skb(skb);
                                ret = 0;
                        }
                        if(c) {
-                               FreeSkb(skb);
+                               dev_kfree_skb(skb);
                                FsmEvent(&st->l2.l2m, EV_L2_FRAME_ERROR, (void *)(long)c);
                                ret = 0;
                        }
                        if (ret)
-                               FreeSkb(skb);
+                               dev_kfree_skb(skb);
                        break;
                case (PH_PULL | CONFIRM):
                        FsmEvent(&st->l2.l2m, EV_L2_ACK_PULL, arg);
index f571b5d18e91f4136c34862bd01fd2608b914274..abcc9530eb347b007b74ea1f5a774c361e2c9902 100644 (file)
@@ -390,7 +390,7 @@ setstack_l3dc(struct PStack *st, struct Channel *chanp)
        }
 }
 
-void
+static void
 isdnl3_trans(struct PStack *st, int pr, void *arg) {
        st->l3.l3l2(st, pr, arg);
 }
index af5171da734572dcc934f391d3de6333f2d4e784..33747afc984db717dbb1601031f06dd1ffc69bae 100644 (file)
@@ -122,7 +122,7 @@ isurf_interrupt(int intno, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_isurf(struct IsdnCardState *cs)
 {
        release_region(cs->hw.isurf.reset, 1);
index b843b7509ae2d4d484158048f084b17aabdc3826..908a7e14442179dba17794a886949edc22ff044a 100644 (file)
@@ -25,7 +25,7 @@
 #include "isdnl1.h"
 
 extern const char *CardType[];
-const char *ix1_revision = "$Revision: 2.12.2.4 $";
+static const char *ix1_revision = "$Revision: 2.12.2.4 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -162,7 +162,7 @@ ix1micro_interrupt(int intno, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_ix1micro(struct IsdnCardState *cs)
 {
        if (cs->hw.ix1.cfg_reg)
index f05d52757557133d9533474abfa10a449c1162d9..363ae3179bbde9a255148c56c5e90a5e6d0eaf81 100644 (file)
@@ -74,7 +74,7 @@ jade_write_indirect(struct IsdnCardState *cs, u_char reg, u_char value)
 
 
 
-void
+static void
 modejade(struct BCState *bcs, int mode, int bc)
 {
     struct IsdnCardState *cs = bcs->cs;
@@ -190,7 +190,7 @@ jade_l2l1(struct PStack *st, int pr, void *arg)
     }
 }
 
-void
+static void
 close_jadestate(struct BCState *bcs)
 {
     modejade(bcs, 0, bcs->channel);
@@ -243,7 +243,7 @@ open_jadestate(struct IsdnCardState *cs, struct BCState *bcs)
 }
 
 
-int
+static int
 setstack_jade(struct PStack *st, struct BCState *bcs)
 {
        bcs->channel = st->l1.bc;
index fa29444859941325f40311ea202c0edb4464e451..29055e1ee38169889731c5097f2fd464c217c9f6 100644 (file)
 #define        jade_TXAUDIOCH2CFG                              0x1A
 
 extern int JadeVersion(struct IsdnCardState *cs, char *s);
-extern void modejade(struct BCState *bcs, int mode, int bc);
 extern void clear_pending_jade_ints(struct IsdnCardState *cs);
 extern void initjade(struct IsdnCardState *cs);
 
index d6c1c8f8329d8672f260945b23033bcabb2997ea..c5c36eeff26111ee962b4e62b4548596b53a9304 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/ctype.h>
 
 extern char *HiSax_getrev(const char *revision);
-const char *l3_1tr6_revision = "$Revision: 2.15.2.3 $";
+static const char *l3_1tr6_revision = "$Revision: 2.15.2.3 $";
 
 #define MsgHead(ptr, cref, mty, dis) \
        *ptr++ = dis; \
index ec92308c1efc75138b22646be00ea4dc811f948c..a6d2abdb478aeab5c018c0e635d4bc5a5d7c70ee 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/config.h>
 
 extern char *HiSax_getrev(const char *revision);
-const char *dss1_revision = "$Revision: 2.32.2.3 $";
+static const char *dss1_revision = "$Revision: 2.32.2.3 $";
 
 #define EXT_BEARER_CAPS 1
 
index 3ab3a54daac1b90522d1df55bb4b4a7d5b9b4907..f7041d5ba64e3c08b1ea6ca733b4e22cecdfb66a 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/ctype.h>
 
 extern char *HiSax_getrev(const char *revision);
-const char *ni1_revision = "$Revision: 2.8.2.3 $";
+static const char *ni1_revision = "$Revision: 2.8.2.3 $";
 
 #define EXT_BEARER_CAPS 1
 
@@ -2665,7 +2665,7 @@ static void l3ni1_spid_send( struct l3_process *pc, u_char pr, void *arg )
        l3ni1_SendSpid( pc, pr, arg, 20 );
 }
 
-void l3ni1_spid_epid( struct l3_process *pc, u_char pr, void *arg )
+static void l3ni1_spid_epid( struct l3_process *pc, u_char pr, void *arg )
 {
        struct sk_buff *skb = arg;
 
index 3ac4484a4886bf1757c51993f843d536f7f898d4..fe11f226b28539b5a0c4c40920ce8ee8f4e98821 100644 (file)
@@ -18,7 +18,7 @@
 
 extern const char *CardType[];
 
-const char *mic_revision = "$Revision: 1.12.2.4 $";
+static const char *mic_revision = "$Revision: 1.12.2.4 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -157,7 +157,7 @@ mic_interrupt(int intno, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_mic(struct IsdnCardState *cs)
 {
        int bytecnt = 8;
index fe61d26365d390ee2e7d6a08982a7272d562f3ca..94da03c30c51507c1af9c74d449e04930a4a3c52 100644 (file)
@@ -25,8 +25,6 @@
 #include <asm/io.h>
 #include "netjet.h"
 
-const char *NETjet_revision = "$Revision: 1.29.2.4 $";
-
 /* Interface functions */
 
 u_char
@@ -66,7 +64,7 @@ NETjet_WriteICfifo(struct IsdnCardState *cs, u_char *data, int size)
        outsb(cs->hw.njet.isac, data, size);
 }
 
-void fill_mem(struct BCState *bcs, u_int *pos, u_int cnt, int chan, u_char fill)
+static void fill_mem(struct BCState *bcs, u_int *pos, u_int cnt, int chan, u_char fill)
 {
        u_int mask=0x000000ff, val = 0, *p=pos;
        u_int i;
@@ -85,7 +83,7 @@ void fill_mem(struct BCState *bcs, u_int *pos, u_int cnt, int chan, u_char fill)
        }
 }
 
-void
+static void
 mode_tiger(struct BCState *bcs, int mode, int bc)
 {
        struct IsdnCardState *cs = bcs->cs;
@@ -852,7 +850,7 @@ tiger_l2l1(struct PStack *st, int pr, void *arg)
 }
 
 
-void
+static void
 close_tigerstate(struct BCState *bcs)
 {
        mode_tiger(bcs, 0, bcs->channel);
@@ -900,7 +898,7 @@ open_tigerstate(struct IsdnCardState *cs, struct BCState *bcs)
        return (0);
 }
 
-int
+static int
 setstack_tiger(struct PStack *st, struct BCState *bcs)
 {
        bcs->channel = st->l1.bc;
@@ -966,7 +964,7 @@ inittiger(struct IsdnCardState *cs)
        cs->bcs[1].BC_Close = close_tigerstate;
 }
 
-void
+static void
 releasetiger(struct IsdnCardState *cs)
 {
        if (cs->bcs[0].hw.tiger.send) {
index cf77d8360975dd07b999375ac0773ab050548ada..68a2159cbd1109ffd9d06d3de6ec83bcc4e53ea9 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/isapnp.h>
 
 extern const char *CardType[];
-const char *niccy_revision = "$Revision: 1.21.2.4 $";
+static const char *niccy_revision = "$Revision: 1.21.2.4 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -178,7 +178,7 @@ niccy_interrupt(int intno, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_niccy(struct IsdnCardState *cs)
 {
        if (cs->subtyp == NICCY_PCI) {
index fd664697f821bf8d10cbe3948130e04dd3268345..a7d3cd3f36fdabf7b4fb2f6f25366ddb7aa28ba9 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/ppp_defs.h>
 #include "netjet.h"
 
-const char *NETjet_S_revision = "$Revision: 2.13.2.4 $";
+static const char *NETjet_S_revision = "$Revision: 2.13.2.4 $";
 
 static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off)
 {
index 3d6441e9633c670dc912d93efda3b4866165a527..1ae7cac98a877724957349f52e9c3d7066e5623b 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/ppp_defs.h>
 #include "netjet.h"
 
-const char *NETjet_U_revision = "$Revision: 2.14.2.3 $";
+static const char *NETjet_U_revision = "$Revision: 2.14.2.3 $";
 
 static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off)
 {
index 170fcd4a39845cbc9e4b8fbe9756d07986287fa9..abecabf8c271326d201dc2b3e1c78bcd369af6fd 100644 (file)
@@ -516,7 +516,7 @@ struct MessageType cause_1tr6[] =
        {CAUSE_UserInfoDiscarded, "User Info Discarded"}
 };
 
-int cause_1tr6_len = (sizeof(cause_1tr6) / sizeof(struct MessageType));
+static int cause_1tr6_len = (sizeof(cause_1tr6) / sizeof(struct MessageType));
 
 static int
 prcause_1tr6(char *dest, u_char * p)
@@ -935,7 +935,7 @@ display(char *dest, u_char * p)
        return (dp - dest);
 }
 
-int
+static int
 prfacility(char *dest, u_char * p)
 {
        char *dp = dest;
index f3c481384a4ea8d93d3536c6aca4cd768ac4b649..7b63085ea6e51107c939e8011d86f03607f4f8f9 100644 (file)
@@ -17,7 +17,7 @@
 #include "isdnl1.h"
 
 extern const char *CardType[];
-const char *s0box_revision = "$Revision: 2.6.2.4 $";
+static const char *s0box_revision = "$Revision: 2.6.2.4 $";
 
 static inline void
 writereg(unsigned int padr, signed int addr, u_char off, u_char val) {
@@ -183,7 +183,7 @@ s0box_interrupt(int intno, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_s0box(struct IsdnCardState *cs)
 {
        release_region(cs->hw.teles3.cfg_reg, 8);
index 9e6d3d686cce58937b9f2895686f6af8cc95e8ae..821776e1561acb63ad9b5ad1c062c97bce6298de 100644 (file)
@@ -171,7 +171,7 @@ SaphirWatchDog(struct IsdnCardState *cs)
        mod_timer(&cs->hw.saphir.timer, jiffies+1*HZ);
 }
 
-void
+static void
 release_io_saphir(struct IsdnCardState *cs)
 {
        byteout(cs->hw.saphir.cfg_reg + IRQ_REG, 0xff);
index 8390f16068534e4c2962fbaec73c8921eca85bd7..8c044a6a7fe3b1e6567a5926f99d71932dee4494 100644 (file)
@@ -51,9 +51,9 @@
 
 extern const char *CardType[];
 
-const char *Sedlbauer_revision = "$Revision: 1.34.2.6 $";
+static const char *Sedlbauer_revision = "$Revision: 1.34.2.6 $";
 
-const char *Sedlbauer_Types[] =
+static const char *Sedlbauer_Types[] =
        {"None", "speed card/win", "speed star", "speed fax+",
        "speed win II / ISDN PC/104", "speed star II", "speed pci",
        "speed fax+ pyramid", "speed fax+ pci", "HST Saphir III"};
@@ -394,7 +394,7 @@ sedlbauer_interrupt_isar(int intno, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_sedlbauer(struct IsdnCardState *cs)
 {
        int bytecnt = 8;
index 132840b750cea71c2170bc9bf0a9aef23572b3fb..cdf35dc564c41d90c910abb53a1fa5923b43005c 100644 (file)
@@ -19,7 +19,7 @@
 #include "isdnl1.h"
 
 extern const char *CardType[];
-const char *sportster_revision = "$Revision: 1.16.2.4 $";
+static const char *sportster_revision = "$Revision: 1.16.2.4 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -132,7 +132,7 @@ sportster_interrupt(int intno, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_sportster(struct IsdnCardState *cs)
 {
        int i, adr;
@@ -144,7 +144,7 @@ release_io_sportster(struct IsdnCardState *cs)
        }
 }
 
-void
+static void
 reset_sportster(struct IsdnCardState *cs)
 {
        cs->hw.spt.res_irq |= SPORTSTER_RESET; /* Reset On */
index e8177b017b1d7184f998177efd4706db7d91b6b0..0fda5c89429b4a73180a7c1bfbcfaa79a779e8ee 100644 (file)
@@ -450,12 +450,8 @@ int st5481_setup_isocpipes(struct urb* urb[2], struct usb_device *dev,
                           usb_complete_t complete, void *context);
 void st5481_release_isocpipes(struct urb* urb[2]);
 
-int  st5481_isoc_flatten(struct urb *urb);
 void st5481_usb_pipe_reset(struct st5481_adapter *adapter,
                    u_char pipe, ctrl_complete_t complete, void *context);
-void st5481_usb_ctrl_msg(struct st5481_adapter *adapter,
-                 u8 request, u8 requesttype, u16 value, u16 index,
-                 ctrl_complete_t complete, void *context);
 void st5481_usb_device_ctrl_msg(struct st5481_adapter *adapter,
                         u8 request, u16 value,
                         ctrl_complete_t complete, void *context);
diff --git a/drivers/isdn/hisax/st5481_hdlc.c b/drivers/isdn/hisax/st5481_hdlc.c
deleted file mode 100644 (file)
index 680f42e..0000000
+++ /dev/null
@@ -1,580 +0,0 @@
-/*
- * Driver for ST5481 USB ISDN modem
- *
- * Author       Frode Isaksen
- * Copyright    2001 by Frode Isaksen      <fisaksen@bewan.com>
- *              2001 by Kai Germaschewski  <kai.germaschewski@gmx.de>
- * 
- * This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by reference.
- *
- */
-
-#include <linux/crc-ccitt.h>
-#include "st5481_hdlc.h"
-
-
-enum {
-       HDLC_FAST_IDLE,HDLC_GET_FLAG_B0,HDLC_GETFLAG_B1A6,HDLC_GETFLAG_B7,
-       HDLC_GET_DATA,HDLC_FAST_FLAG
-};
-
-enum {
-       HDLC_SEND_DATA,HDLC_SEND_CRC1,HDLC_SEND_FAST_FLAG,
-       HDLC_SEND_FIRST_FLAG,HDLC_SEND_CRC2,HDLC_SEND_CLOSING_FLAG,
-       HDLC_SEND_IDLE1,HDLC_SEND_FAST_IDLE,HDLC_SENDFLAG_B0,
-       HDLC_SENDFLAG_B1A6,HDLC_SENDFLAG_B7,STOPPED
-};
-
-void 
-hdlc_rcv_init(struct hdlc_vars *hdlc, int do_adapt56)
-{
-       hdlc->bit_shift = 0;
-       hdlc->hdlc_bits1 = 0;
-       hdlc->data_bits = 0;
-       hdlc->ffbit_shift = 0;
-       hdlc->data_received = 0;
-       hdlc->state = HDLC_GET_DATA;
-       hdlc->do_adapt56 = do_adapt56;
-       hdlc->dchannel = 0;
-       hdlc->crc = 0;
-       hdlc->cbin = 0;
-       hdlc->shift_reg = 0;
-       hdlc->ffvalue = 0;
-       hdlc->dstpos = 0;
-}
-
-void 
-hdlc_out_init(struct hdlc_vars *hdlc, int is_d_channel, int do_adapt56)
-{
-       hdlc->bit_shift = 0;
-       hdlc->hdlc_bits1 = 0;
-       hdlc->data_bits = 0;
-       hdlc->ffbit_shift = 0;
-       hdlc->data_received = 0;
-       hdlc->do_closing = 0;
-       hdlc->ffvalue = 0;
-       if (is_d_channel) {
-               hdlc->dchannel = 1;
-               hdlc->state = HDLC_SEND_FIRST_FLAG;
-       } else {
-               hdlc->dchannel = 0;
-               hdlc->state = HDLC_SEND_FAST_FLAG;
-               hdlc->ffvalue = 0x7e;
-       } 
-       hdlc->cbin = 0x7e;
-       hdlc->bit_shift = 0;
-       if(do_adapt56){
-               hdlc->do_adapt56 = 1;           
-               hdlc->data_bits = 0;
-               hdlc->state = HDLC_SENDFLAG_B0;
-       } else {
-               hdlc->do_adapt56 = 0;           
-               hdlc->data_bits = 8;
-       }
-       hdlc->shift_reg = 0;
-}
-
-/*
-  hdlc_decode - decodes HDLC frames from a transparent bit stream.
-
-  The source buffer is scanned for valid HDLC frames looking for
-  flags (01111110) to indicate the start of a frame. If the start of
-  the frame is found, the bit stuffing is removed (0 after 5 1's).
-  When a new flag is found, the complete frame has been received
-  and the CRC is checked.
-  If a valid frame is found, the function returns the frame length 
-  excluding the CRC with the bit HDLC_END_OF_FRAME set.
-  If the beginning of a valid frame is found, the function returns
-  the length. 
-  If a framing error is found (too many 1s and not a flag) the function 
-  returns the length with the bit HDLC_FRAMING_ERROR set.
-  If a CRC error is found the function returns the length with the
-  bit HDLC_CRC_ERROR set.
-  If the frame length exceeds the destination buffer size, the function
-  returns the length with the bit HDLC_LENGTH_ERROR set.
-
-  src - source buffer
-  slen - source buffer length
-  count - number of bytes removed (decoded) from the source buffer
-  dst _ destination buffer
-  dsize - destination buffer size
-  returns - number of decoded bytes in the destination buffer and status
-  flag.
- */
-int hdlc_decode(struct hdlc_vars *hdlc, const unsigned char *src,
-               int slen, int *count, unsigned char *dst, int dsize)
-{
-       int status=0;
-
-       static const unsigned char fast_flag[]={
-               0x00,0x00,0x00,0x20,0x30,0x38,0x3c,0x3e,0x3f
-       };
-
-       static const unsigned char fast_flag_value[]={
-               0x00,0x7e,0xfc,0xf9,0xf3,0xe7,0xcf,0x9f,0x3f
-       };
-
-       static const unsigned char fast_abort[]={
-               0x00,0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff
-       };
-
-       *count = slen;
-
-       while(slen > 0){
-               if(hdlc->bit_shift==0){
-                       hdlc->cbin = *src++;
-                       slen--;
-                       hdlc->bit_shift = 8;
-                       if(hdlc->do_adapt56){
-                               hdlc->bit_shift --;
-                       }
-               }
-
-               switch(hdlc->state){
-               case STOPPED:
-                       return 0;
-               case HDLC_FAST_IDLE:
-                       if(hdlc->cbin == 0xff){
-                               hdlc->bit_shift = 0;
-                               break;
-                       }
-                       hdlc->state = HDLC_GET_FLAG_B0;
-                       hdlc->hdlc_bits1 = 0;
-                       hdlc->bit_shift = 8;
-                       break;
-               case HDLC_GET_FLAG_B0:
-                       if(!(hdlc->cbin & 0x80)) {
-                               hdlc->state = HDLC_GETFLAG_B1A6;
-                               hdlc->hdlc_bits1 = 0;
-                       } else {
-                               if(!hdlc->do_adapt56){
-                                       if(++hdlc->hdlc_bits1 >=8 ) if(hdlc->bit_shift==1)
-                                               hdlc->state = HDLC_FAST_IDLE;
-                               }
-                       }
-                       hdlc->cbin<<=1;
-                       hdlc->bit_shift --;
-                       break;
-               case HDLC_GETFLAG_B1A6:
-                       if(hdlc->cbin & 0x80){
-                               hdlc->hdlc_bits1++;
-                               if(hdlc->hdlc_bits1==6){
-                                       hdlc->state = HDLC_GETFLAG_B7;
-                               }
-                       } else {
-                               hdlc->hdlc_bits1 = 0;
-                       }
-                       hdlc->cbin<<=1;
-                       hdlc->bit_shift --;
-                       break;
-               case HDLC_GETFLAG_B7:
-                       if(hdlc->cbin & 0x80) {
-                               hdlc->state = HDLC_GET_FLAG_B0;
-                       } else {
-                               hdlc->state = HDLC_GET_DATA;
-                               hdlc->crc = 0xffff;
-                               hdlc->shift_reg = 0;
-                               hdlc->hdlc_bits1 = 0;
-                               hdlc->data_bits = 0;
-                               hdlc->data_received = 0;
-                       }
-                       hdlc->cbin<<=1;
-                       hdlc->bit_shift --;
-                       break;
-               case HDLC_GET_DATA:
-                       if(hdlc->cbin & 0x80){
-                               hdlc->hdlc_bits1++;
-                               switch(hdlc->hdlc_bits1){
-                               case 6:
-                                       break;
-                               case 7:
-                                       if(hdlc->data_received) {
-                                               // bad frame
-                                               status = -HDLC_FRAMING_ERROR;
-                                       }
-                                       if(!hdlc->do_adapt56){
-                                               if(hdlc->cbin==fast_abort[hdlc->bit_shift+1]){
-                                                       hdlc->state = HDLC_FAST_IDLE;
-                                                       hdlc->bit_shift=1;
-                                                       break;
-                                               }
-                                       } else {
-                                               hdlc->state = HDLC_GET_FLAG_B0;
-                                       }
-                                       break;
-                               default:
-                                       hdlc->shift_reg>>=1;
-                                       hdlc->shift_reg |= 0x80;
-                                       hdlc->data_bits++;
-                                       break;
-                               }
-                       } else {
-                               switch(hdlc->hdlc_bits1){
-                               case 5:
-                                       break;
-                               case 6:
-                                       if(hdlc->data_received){
-                                               if (hdlc->dstpos < 2) {
-                                                       status = -HDLC_FRAMING_ERROR;
-                                               } else if (hdlc->crc != 0xf0b8){
-                                                       // crc error
-                                                       status = -HDLC_CRC_ERROR;
-                                               } else {
-                                                       // remove CRC
-                                                       hdlc->dstpos -= 2;
-                                                       // good frame
-                                                       status = hdlc->dstpos;
-                                               }
-                                       }
-                                       hdlc->crc = 0xffff;
-                                       hdlc->shift_reg = 0;
-                                       hdlc->data_bits = 0;
-                                       if(!hdlc->do_adapt56){
-                                               if(hdlc->cbin==fast_flag[hdlc->bit_shift]){
-                                                       hdlc->ffvalue = fast_flag_value[hdlc->bit_shift];
-                                                       hdlc->state = HDLC_FAST_FLAG;
-                                                       hdlc->ffbit_shift = hdlc->bit_shift;
-                                                       hdlc->bit_shift = 1;
-                                               } else {
-                                                       hdlc->state = HDLC_GET_DATA;
-                                                       hdlc->data_received = 0;
-                                               }
-                                       } else {
-                                               hdlc->state = HDLC_GET_DATA;
-                                               hdlc->data_received = 0;
-                                       }
-                                       break;
-                               default:
-                                       hdlc->shift_reg>>=1;
-                                       hdlc->data_bits++;
-                                       break;
-                               }
-                               hdlc->hdlc_bits1 = 0;
-                       }
-                       if (status) {
-                               hdlc->dstpos = 0;
-                               *count -= slen;
-                               hdlc->cbin <<= 1;
-                               hdlc->bit_shift--;
-                               return status;
-                       }
-                       if(hdlc->data_bits==8){
-                               hdlc->data_bits = 0;
-                               hdlc->data_received = 1;
-                               hdlc->crc = crc_ccitt_byte(hdlc->crc, hdlc->shift_reg);
-
-                               // good byte received
-                               if (dsize--) {
-                                       dst[hdlc->dstpos++] = hdlc->shift_reg;
-                               } else {
-                                       // frame too long
-                                       status = -HDLC_LENGTH_ERROR;
-                                       hdlc->dstpos = 0;
-                               }
-                       }
-                       hdlc->cbin <<= 1;
-                       hdlc->bit_shift--;
-                       break;
-               case HDLC_FAST_FLAG:
-                       if(hdlc->cbin==hdlc->ffvalue){
-                               hdlc->bit_shift = 0;
-                               break;
-                       } else {
-                               if(hdlc->cbin == 0xff){
-                                       hdlc->state = HDLC_FAST_IDLE;
-                                       hdlc->bit_shift=0;
-                               } else if(hdlc->ffbit_shift==8){
-                                       hdlc->state = HDLC_GETFLAG_B7;
-                                       break;
-                               } else {
-                                       hdlc->shift_reg = fast_abort[hdlc->ffbit_shift-1];
-                                       hdlc->hdlc_bits1 = hdlc->ffbit_shift-2;
-                                       if(hdlc->hdlc_bits1<0)hdlc->hdlc_bits1 = 0;
-                                       hdlc->data_bits = hdlc->ffbit_shift-1;
-                                       hdlc->state = HDLC_GET_DATA;
-                                       hdlc->data_received = 0;
-                               }
-                       }
-                       break;
-               default:
-                       break;
-               }
-       }
-       *count -= slen;
-       return 0;
-}
-
-/*
-  hdlc_encode - encodes HDLC frames to a transparent bit stream.
-
-  The bit stream starts with a beginning flag (01111110). After
-  that each byte is added to the bit stream with bit stuffing added
-  (0 after 5 1's).
-  When the last byte has been removed from the source buffer, the
-  CRC (2 bytes is added) and the frame terminates with the ending flag.
-  For the dchannel, the idle character (all 1's) is also added at the end.
-  If this function is called with empty source buffer (slen=0), flags or
-  idle character will be generated.
-  src - source buffer
-  slen - source buffer length
-  count - number of bytes removed (encoded) from source buffer
-  dst _ destination buffer
-  dsize - destination buffer size
-  returns - number of encoded bytes in the destination buffer
-*/
-int hdlc_encode(struct hdlc_vars *hdlc, const unsigned char *src, 
-               unsigned short slen, int *count,
-               unsigned char *dst, int dsize)
-{
-       static const unsigned char xfast_flag_value[] = {
-               0x7e,0x3f,0x9f,0xcf,0xe7,0xf3,0xf9,0xfc,0x7e
-       };
-
-       int len = 0;
-
-       *count = slen;
-
-       while (dsize > 0) {
-               if(hdlc->bit_shift==0){ 
-                       if(slen && !hdlc->do_closing){
-                               hdlc->shift_reg = *src++;
-                               slen--;
-                               if (slen == 0) 
-                                       hdlc->do_closing = 1;  /* closing sequence, CRC + flag(s) */
-                               hdlc->bit_shift = 8;
-                       } else {
-                               if(hdlc->state == HDLC_SEND_DATA){
-                                       if(hdlc->data_received){
-                                               hdlc->state = HDLC_SEND_CRC1;
-                                               hdlc->crc ^= 0xffff;
-                                               hdlc->bit_shift = 8;
-                                               hdlc->shift_reg = hdlc->crc & 0xff;
-                                       } else if(!hdlc->do_adapt56){
-                                               hdlc->state = HDLC_SEND_FAST_FLAG;
-                                       } else {
-                                               hdlc->state = HDLC_SENDFLAG_B0;
-                                       }
-                               }
-                         
-                       }
-               }
-
-               switch(hdlc->state){
-               case STOPPED:
-                       while (dsize--)
-                               *dst++ = 0xff;
-                 
-                       return dsize;
-               case HDLC_SEND_FAST_FLAG:
-                       hdlc->do_closing = 0;
-                       if(slen == 0){
-                               *dst++ = hdlc->ffvalue;
-                               len++;
-                               dsize--;
-                               break;
-                       }
-                       if(hdlc->bit_shift==8){
-                               hdlc->cbin = hdlc->ffvalue>>(8-hdlc->data_bits);
-                               hdlc->state = HDLC_SEND_DATA;
-                               hdlc->crc = 0xffff;
-                               hdlc->hdlc_bits1 = 0;
-                               hdlc->data_received = 1;
-                       }
-                       break;
-               case HDLC_SENDFLAG_B0:
-                       hdlc->do_closing = 0;
-                       hdlc->cbin <<= 1;
-                       hdlc->data_bits++;
-                       hdlc->hdlc_bits1 = 0;
-                       hdlc->state = HDLC_SENDFLAG_B1A6;
-                       break;
-               case HDLC_SENDFLAG_B1A6:
-                       hdlc->cbin <<= 1;
-                       hdlc->data_bits++;
-                       hdlc->cbin++;
-                       if(++hdlc->hdlc_bits1 == 6)
-                               hdlc->state = HDLC_SENDFLAG_B7;
-                       break;
-               case HDLC_SENDFLAG_B7:
-                       hdlc->cbin <<= 1;
-                       hdlc->data_bits++;
-                       if(slen == 0){
-                               hdlc->state = HDLC_SENDFLAG_B0;
-                               break;
-                       }
-                       if(hdlc->bit_shift==8){
-                               hdlc->state = HDLC_SEND_DATA;
-                               hdlc->crc = 0xffff;
-                               hdlc->hdlc_bits1 = 0;
-                               hdlc->data_received = 1;
-                       }
-                       break;
-               case HDLC_SEND_FIRST_FLAG:
-                       hdlc->data_received = 1;
-                       if(hdlc->data_bits==8){
-                               hdlc->state = HDLC_SEND_DATA;
-                               hdlc->crc = 0xffff;
-                               hdlc->hdlc_bits1 = 0;
-                               break;
-                       }
-                       hdlc->cbin <<= 1;
-                       hdlc->data_bits++;
-                       if(hdlc->shift_reg & 0x01)
-                               hdlc->cbin++;
-                       hdlc->shift_reg >>= 1;
-                       hdlc->bit_shift--;
-                       if(hdlc->bit_shift==0){
-                               hdlc->state = HDLC_SEND_DATA;
-                               hdlc->crc = 0xffff;
-                               hdlc->hdlc_bits1 = 0;
-                       }
-                       break;
-               case HDLC_SEND_DATA:
-                       hdlc->cbin <<= 1;
-                       hdlc->data_bits++;
-                       if(hdlc->hdlc_bits1 == 5){
-                               hdlc->hdlc_bits1 = 0;
-                               break;
-                       }
-                       if(hdlc->bit_shift==8){
-                               hdlc->crc = crc_ccitt_byte(hdlc->crc, hdlc->shift_reg);
-                       }
-                       if(hdlc->shift_reg & 0x01){
-                               hdlc->hdlc_bits1++;
-                               hdlc->cbin++;
-                               hdlc->shift_reg >>= 1;
-                               hdlc->bit_shift--;
-                       } else {
-                               hdlc->hdlc_bits1 = 0;
-                               hdlc->shift_reg >>= 1;
-                               hdlc->bit_shift--;
-                       }
-                       break;
-               case HDLC_SEND_CRC1:
-                       hdlc->cbin <<= 1;
-                       hdlc->data_bits++;
-                       if(hdlc->hdlc_bits1 == 5){
-                               hdlc->hdlc_bits1 = 0;
-                               break;
-                       }
-                       if(hdlc->shift_reg & 0x01){
-                               hdlc->hdlc_bits1++;
-                               hdlc->cbin++;
-                               hdlc->shift_reg >>= 1;
-                               hdlc->bit_shift--;
-                       } else {
-                               hdlc->hdlc_bits1 = 0;
-                               hdlc->shift_reg >>= 1;
-                               hdlc->bit_shift--;
-                       }
-                       if(hdlc->bit_shift==0){
-                               hdlc->shift_reg = (hdlc->crc >> 8);
-                               hdlc->state = HDLC_SEND_CRC2;
-                               hdlc->bit_shift = 8;
-                       }
-                       break;
-               case HDLC_SEND_CRC2:
-                       hdlc->cbin <<= 1;
-                       hdlc->data_bits++;
-                       if(hdlc->hdlc_bits1 == 5){
-                               hdlc->hdlc_bits1 = 0;
-                               break;
-                       }
-                       if(hdlc->shift_reg & 0x01){
-                               hdlc->hdlc_bits1++;
-                               hdlc->cbin++;
-                               hdlc->shift_reg >>= 1;
-                               hdlc->bit_shift--;
-                       } else {
-                               hdlc->hdlc_bits1 = 0;
-                               hdlc->shift_reg >>= 1;
-                               hdlc->bit_shift--;
-                       }
-                       if(hdlc->bit_shift==0){
-                               hdlc->shift_reg = 0x7e;
-                               hdlc->state = HDLC_SEND_CLOSING_FLAG;
-                               hdlc->bit_shift = 8;
-                       }
-                       break;
-               case HDLC_SEND_CLOSING_FLAG:
-                       hdlc->cbin <<= 1;
-                       hdlc->data_bits++;
-                       if(hdlc->hdlc_bits1 == 5){
-                               hdlc->hdlc_bits1 = 0;
-                               break;
-                       }
-                       if(hdlc->shift_reg & 0x01){
-                               hdlc->cbin++;
-                       }
-                       hdlc->shift_reg >>= 1;
-                       hdlc->bit_shift--;
-                       if(hdlc->bit_shift==0){
-                               hdlc->ffvalue = xfast_flag_value[hdlc->data_bits];
-                               if(hdlc->dchannel){
-                                       hdlc->ffvalue = 0x7e;
-                                       hdlc->state = HDLC_SEND_IDLE1;
-                                       hdlc->bit_shift = 8-hdlc->data_bits;
-                                       if(hdlc->bit_shift==0)
-                                               hdlc->state = HDLC_SEND_FAST_IDLE;
-                               } else {
-                                       if(!hdlc->do_adapt56){
-                                               hdlc->state = HDLC_SEND_FAST_FLAG;
-                                               hdlc->data_received = 0;
-                                       } else {
-                                               hdlc->state = HDLC_SENDFLAG_B0;
-                                               hdlc->data_received = 0;
-                                       }
-                                       // Finished with this frame, send flags
-                                       if (dsize > 1) dsize = 1; 
-                               }
-                       }
-                       break;
-               case HDLC_SEND_IDLE1:
-                       hdlc->do_closing = 0;
-                       hdlc->cbin <<= 1;
-                       hdlc->cbin++;
-                       hdlc->data_bits++;
-                       hdlc->bit_shift--;
-                       if(hdlc->bit_shift==0){
-                               hdlc->state = HDLC_SEND_FAST_IDLE;
-                               hdlc->bit_shift = 0;
-                       }
-                       break;
-               case HDLC_SEND_FAST_IDLE:
-                       hdlc->do_closing = 0;
-                       hdlc->cbin = 0xff;
-                       hdlc->data_bits = 8;
-                       if(hdlc->bit_shift == 8){
-                               hdlc->cbin = 0x7e;
-                               hdlc->state = HDLC_SEND_FIRST_FLAG;
-                       } else {
-                               *dst++ = hdlc->cbin;
-                               hdlc->bit_shift = hdlc->data_bits = 0;
-                               len++;
-                               dsize = 0;
-                       }
-                       break;
-               default:
-                       break;
-               }
-               if(hdlc->do_adapt56){
-                       if(hdlc->data_bits==7){
-                               hdlc->cbin <<= 1;
-                               hdlc->cbin++;
-                               hdlc->data_bits++;
-                       }
-               }
-               if(hdlc->data_bits==8){
-                       *dst++ = hdlc->cbin;
-                       hdlc->data_bits = 0;
-                       len++;
-                       dsize--;
-               }
-       }
-       *count -= slen;
-
-       return len;
-}
-
diff --git a/drivers/isdn/hisax/st5481_hdlc.h b/drivers/isdn/hisax/st5481_hdlc.h
deleted file mode 100644 (file)
index 495432f..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Driver for ST5481 USB ISDN modem
- *
- * Author       Frode Isaksen
- * Copyright    2001 by Frode Isaksen      <fisaksen@bewan.com>
- *              2001 by Kai Germaschewski  <kai.germaschewski@gmx.de>
- * 
- * This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by reference.
- *
- */
-
-#ifndef __ST5481_HDLC_H__
-#define __ST5481_HDLC_H__
-
-struct hdlc_vars {
-       int bit_shift; 
-       int hdlc_bits1;
-       int data_bits;
-       int ffbit_shift; // encoding only
-       int state;
-       int dstpos;
-
-       int data_received:1; // set if transferring data
-       int dchannel:1; // set if D channel (send idle instead of flags)
-       int do_adapt56:1; // set if 56K adaptation
-        int do_closing:1; // set if in closing phase (need to send CRC + flag
-
-       unsigned short crc;
-
-       unsigned char cbin; 
-       unsigned char shift_reg;
-       unsigned char ffvalue;
-       
-};
-
-
-/*
-  The return value from hdlc_decode is
-  the frame length, 0 if no complete frame was decoded,
-  or a negative error number
-*/
-
-#define HDLC_FRAMING_ERROR     1
-#define HDLC_CRC_ERROR         2
-#define HDLC_LENGTH_ERROR      3
-
-void 
-hdlc_rcv_init(struct hdlc_vars *hdlc, int do_adapt56);
-
-int
-hdlc_decode(struct hdlc_vars *hdlc, const unsigned char *src, int slen,int *count, 
-           unsigned char *dst, int dsize);
-
-void 
-hdlc_out_init(struct hdlc_vars *hdlc,int is_d_channel,int do_adapt56);
-
-int 
-hdlc_encode(struct hdlc_vars *hdlc,const unsigned char *src,unsigned short slen,int *count,
-           unsigned char *dst,int dsize);
-
-#endif
index 2369180b1cb1f685a1d732f5ae38ae2d96993b37..ab62223297a56d8cdd2a097341ccd49ade474f42 100644 (file)
@@ -15,6 +15,8 @@
 #include <linux/slab.h>
 #include "st5481.h"
 
+static int st5481_isoc_flatten(struct urb *urb);
+
 /* ======================================================================
  * control pipe
  */
@@ -55,9 +57,9 @@ static void usb_next_ctrl_msg(struct urb *urb,
  * Asynchronous endpoint 0 request (async version of usb_control_msg).
  * The request will be queued up in a FIFO if the endpoint is busy.
  */
-void usb_ctrl_msg(struct st5481_adapter *adapter,
-                 u8 request, u8 requesttype, u16 value, u16 index,
-                 ctrl_complete_t complete, void *context)
+static void usb_ctrl_msg(struct st5481_adapter *adapter,
+                        u8 request, u8 requesttype, u16 value, u16 index,
+                        ctrl_complete_t complete, void *context)
 {
        struct st5481_ctrl *ctrl = &adapter->ctrl;
        int w_index;
@@ -571,7 +573,7 @@ void st5481_release_in(struct st5481_in *in)
  * Make the transfer_buffer contiguous by
  * copying from the iso descriptors if necessary. 
  */
-int st5481_isoc_flatten(struct urb *urb)
+static int st5481_isoc_flatten(struct urb *urb)
 {
        struct usb_iso_packet_descriptor *pipd,*pend;
        unsigned char *src,*dst;
index 082726db39855c7231bf6ec3b7e3dfbbe76b324c..ceb0df92fd3e4e98aa856ac23824f336b715588a 100644 (file)
@@ -74,7 +74,7 @@ static char *strTeiEvent[] =
        "EV_T202",
 };
 
-unsigned int
+static unsigned int
 random_ri(void)
 {
        unsigned int x;
index ef8984c5f1f7aa142553d36480ce6ac0a1e4b77f..a2b1816af37a8b67b4dfb1832a36e4a0a802fc42 100644 (file)
@@ -18,7 +18,7 @@
 
 extern const char *CardType[];
 
-const char *TeleInt_revision = "$Revision: 1.16.2.5 $";
+static const char *TeleInt_revision = "$Revision: 1.16.2.5 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -203,7 +203,7 @@ TeleInt_Timer(struct IsdnCardState *cs)
        add_timer(&cs->hw.hfc.timer);
 }
 
-void
+static void
 release_io_TeleInt(struct IsdnCardState *cs)
 {
        del_timer(&cs->hw.hfc.timer);
index 5ec5ec3e1eabda2189473130f91adca70d3779af..2b7df8f9823327acd590b3fd138ab45daeb507ff 100644 (file)
@@ -23,7 +23,7 @@
 
 extern const char *CardType[];
 
-const char *teles0_revision = "$Revision: 2.15.2.4 $";
+static const char *teles0_revision = "$Revision: 2.15.2.4 $";
 
 #define TELES_IOMEM_SIZE       0x400
 #define byteout(addr,val) outb(val,addr)
@@ -183,7 +183,7 @@ teles0_interrupt(int intno, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_teles0(struct IsdnCardState *cs)
 {
        if (cs->hw.teles0.cfg_reg)
index c5b1f65f7275a87d1cac654a472f232a4b1f6b72..adeaad62d35c3d01353a5706a17b3ecb458daf45 100644 (file)
@@ -21,7 +21,7 @@
 #include "isdnl1.h"
 
 extern const char *CardType[];
-const char *teles3_revision = "$Revision: 2.19.2.4 $";
+static const char *teles3_revision = "$Revision: 2.19.2.4 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -154,7 +154,7 @@ release_ioregs(struct IsdnCardState *cs, int mask)
                release_region(cs->hw.teles3.hscx[1] + 32, 32);
 }
 
-void
+static void
 release_io_teles3(struct IsdnCardState *cs)
 {
        if (cs->typ == ISDN_CTYPE_TELESPCMCIA) {
index 0661c6c31ad0629b3ae07792f05136718ca31f68..e2bb4fd8e25e7602e9c69fd0151edb739a119daa 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/pci.h>
 
 extern const char *CardType[];
-const char *telespci_revision = "$Revision: 2.23.2.3 $";
+static const char *telespci_revision = "$Revision: 2.23.2.3 $";
 
 #define ZORAN_PO_RQ_PEN        0x02000000
 #define ZORAN_PO_WR    0x00800000
@@ -257,7 +257,7 @@ telespci_interrupt(int intno, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-void
+static void
 release_io_telespci(struct IsdnCardState *cs)
 {
        iounmap(cs->hw.teles0.membase);
index d2b6b8e72980dcd2172d56313685228748c712b1..7baf8e4884716080266b3eb3df37a7d41152da41 100644 (file)
@@ -41,7 +41,7 @@ static const PCI_ENTRY id_list[] =
 
 extern const char *CardType[];
 
-const char *w6692_revision = "$Revision: 1.18.2.4 $";
+static const char *w6692_revision = "$Revision: 1.18.2.4 $";
 
 #define DBUSY_TIMER_VALUE 80
 
@@ -880,7 +880,7 @@ setstack_w6692(struct PStack *st, struct BCState *bcs)
        return (0);
 }
 
-void resetW6692(struct IsdnCardState *cs)
+static void resetW6692(struct IsdnCardState *cs)
 {
        cs->writeW6692(cs, W_D_CTL, W_D_CTL_SRST);
        mdelay(10);
@@ -902,7 +902,7 @@ void resetW6692(struct IsdnCardState *cs)
        }
 }
 
-void __init initW6692(struct IsdnCardState *cs, int part)
+static void __init initW6692(struct IsdnCardState *cs, int part)
 {
        if (part & 1) {
                cs->setstack_d = setstack_W6692;