aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/isar.c
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2005-06-25 17:59:18 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:25:07 -0400
commit672c3fd9069e5a138f9d4afc9aeb5aa34aacce32 (patch)
treeeed95f7e577680c4a92e7f22b22b221b53934fd1 /drivers/isdn/hisax/isar.c
parent8b3d4a2a3ef9488d4477e8823106abfd6039eb66 (diff)
[PATCH] drivers/isdn/hisax/: possible cleanups
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>
Diffstat (limited to 'drivers/isdn/hisax/isar.c')
-rw-r--r--drivers/isdn/hisax/isar.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
index ee081321efb2..642a87c51295 100644
--- a/drivers/isdn/hisax/isar.c
+++ b/drivers/isdn/hisax/isar.c
@@ -21,13 +21,13 @@
21#define ETX 0x03 21#define ETX 0x03
22 22
23#define FAXMODCNT 13 23#define FAXMODCNT 13
24const u_char faxmodulation[] = {3,24,48,72,73,74,96,97,98,121,122,145,146}; 24static const u_char faxmodulation[] = {3,24,48,72,73,74,96,97,98,121,122,145,146};
25static u_int modmask = 0x1fff; 25static u_int modmask = 0x1fff;
26static int frm_extra_delay = 2; 26static int frm_extra_delay = 2;
27static int para_TOA = 6; 27static int para_TOA = 6;
28const u_char *FC1_CMD[] = {"FAE", "FTS", "FRS", "FTM", "FRM", "FTH", "FRH", "CTRL" }; 28static const u_char *FC1_CMD[] = {"FAE", "FTS", "FRS", "FTM", "FRM", "FTH", "FRH", "CTRL" };
29 29
30void isar_setup(struct IsdnCardState *cs); 30static void isar_setup(struct IsdnCardState *cs);
31static void isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para); 31static void isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para);
32static void ll_deliver_faxstat(struct BCState *bcs, u_char status); 32static void ll_deliver_faxstat(struct BCState *bcs, u_char status);
33 33
@@ -45,7 +45,7 @@ waitforHIA(struct IsdnCardState *cs, int timeout)
45} 45}
46 46
47 47
48int 48static int
49sendmsg(struct IsdnCardState *cs, u_char his, u_char creg, u_char len, 49sendmsg(struct IsdnCardState *cs, u_char his, u_char creg, u_char len,
50 u_char *msg) 50 u_char *msg)
51{ 51{
@@ -85,7 +85,7 @@ sendmsg(struct IsdnCardState *cs, u_char his, u_char creg, u_char len,
85} 85}
86 86
87/* Call only with IRQ disabled !!! */ 87/* Call only with IRQ disabled !!! */
88inline void 88static inline void
89rcv_mbox(struct IsdnCardState *cs, struct isar_reg *ireg, u_char *msg) 89rcv_mbox(struct IsdnCardState *cs, struct isar_reg *ireg, u_char *msg)
90{ 90{
91 int i; 91 int i;
@@ -114,7 +114,7 @@ rcv_mbox(struct IsdnCardState *cs, struct isar_reg *ireg, u_char *msg)
114} 114}
115 115
116/* Call only with IRQ disabled !!! */ 116/* Call only with IRQ disabled !!! */
117inline void 117static inline void
118get_irq_infos(struct IsdnCardState *cs, struct isar_reg *ireg) 118get_irq_infos(struct IsdnCardState *cs, struct isar_reg *ireg)
119{ 119{
120 ireg->iis = cs->BC_Read_Reg(cs, 1, ISAR_IIS); 120 ireg->iis = cs->BC_Read_Reg(cs, 1, ISAR_IIS);
@@ -127,7 +127,7 @@ get_irq_infos(struct IsdnCardState *cs, struct isar_reg *ireg)
127#endif 127#endif
128} 128}
129 129
130int 130static int
131waitrecmsg(struct IsdnCardState *cs, u_char *len, 131waitrecmsg(struct IsdnCardState *cs, u_char *len,
132 u_char *msg, int maxdelay) 132 u_char *msg, int maxdelay)
133{ 133{
@@ -185,7 +185,7 @@ ISARVersion(struct IsdnCardState *cs, char *s)
185 return(ver); 185 return(ver);
186} 186}
187 187
188int 188static int
189isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf) 189isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf)
190{ 190{
191 int ret, size, cnt, debug; 191 int ret, size, cnt, debug;
@@ -739,7 +739,7 @@ isar_fill_fifo(struct BCState *bcs)
739 } 739 }
740} 740}
741 741
742inline 742static inline
743struct BCState *sel_bcs_isar(struct IsdnCardState *cs, u_char dpath) 743struct BCState *sel_bcs_isar(struct IsdnCardState *cs, u_char dpath)
744{ 744{
745 if ((!dpath) || (dpath == 3)) 745 if ((!dpath) || (dpath == 3))
@@ -751,7 +751,7 @@ struct BCState *sel_bcs_isar(struct IsdnCardState *cs, u_char dpath)
751 return(NULL); 751 return(NULL);
752} 752}
753 753
754void 754static void
755send_frames(struct BCState *bcs) 755send_frames(struct BCState *bcs)
756{ 756{
757 if (bcs->tx_skb) { 757 if (bcs->tx_skb) {
@@ -806,7 +806,7 @@ send_frames(struct BCState *bcs)
806 } 806 }
807} 807}
808 808
809inline void 809static inline void
810check_send(struct IsdnCardState *cs, u_char rdm) 810check_send(struct IsdnCardState *cs, u_char rdm)
811{ 811{
812 struct BCState *bcs; 812 struct BCState *bcs;
@@ -828,11 +828,13 @@ check_send(struct IsdnCardState *cs, u_char rdm)
828 828
829} 829}
830 830
831const char *dmril[] = {"NO SPEED", "1200/75", "NODEF2", "75/1200", "NODEF4", 831static const char *dmril[] = {"NO SPEED", "1200/75", "NODEF2", "75/1200",
832 "300", "600", "1200", "2400", "4800", "7200", 832 "NODEF4", "300", "600", "1200", "2400",
833 "9600nt", "9600t", "12000", "14400", "WRONG"}; 833 "4800", "7200", "9600nt", "9600t", "12000",
834const char *dmrim[] = {"NO MOD", "NO DEF", "V32/V32b", "V22", "V21", 834 "14400", "WRONG"};
835 "Bell103", "V23", "Bell202", "V17", "V29", "V27ter"}; 835static const char *dmrim[] = {"NO MOD", "NO DEF", "V32/V32b", "V22", "V21",
836 "Bell103", "V23", "Bell202", "V17", "V29",
837 "V27ter"};
836 838
837static void 839static void
838isar_pump_status_rsp(struct BCState *bcs, struct isar_reg *ireg) { 840isar_pump_status_rsp(struct BCState *bcs, struct isar_reg *ireg) {
@@ -1388,7 +1390,7 @@ setup_iom2(struct BCState *bcs) {
1388 udelay(1000); 1390 udelay(1000);
1389} 1391}
1390 1392
1391int 1393static int
1392modeisar(struct BCState *bcs, int mode, int bc) 1394modeisar(struct BCState *bcs, int mode, int bc)
1393{ 1395{
1394 struct IsdnCardState *cs = bcs->cs; 1396 struct IsdnCardState *cs = bcs->cs;
@@ -1562,7 +1564,7 @@ isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para)
1562 sendmsg(cs, dps | ISAR_HIS_PUMPCTRL, ctrl, nom, &p1); 1564 sendmsg(cs, dps | ISAR_HIS_PUMPCTRL, ctrl, nom, &p1);
1563} 1565}
1564 1566
1565void 1567static void
1566isar_setup(struct IsdnCardState *cs) 1568isar_setup(struct IsdnCardState *cs)
1567{ 1569{
1568 u_char msg; 1570 u_char msg;
@@ -1582,7 +1584,7 @@ isar_setup(struct IsdnCardState *cs)
1582 } 1584 }
1583} 1585}
1584 1586
1585void 1587static void
1586isar_l2l1(struct PStack *st, int pr, void *arg) 1588isar_l2l1(struct PStack *st, int pr, void *arg)
1587{ 1589{
1588 struct BCState *bcs = st->l1.bcs; 1590 struct BCState *bcs = st->l1.bcs;
@@ -1681,7 +1683,7 @@ isar_l2l1(struct PStack *st, int pr, void *arg)
1681 } 1683 }
1682} 1684}
1683 1685
1684void 1686static void
1685close_isarstate(struct BCState *bcs) 1687close_isarstate(struct BCState *bcs)
1686{ 1688{
1687 modeisar(bcs, 0, bcs->channel); 1689 modeisar(bcs, 0, bcs->channel);
@@ -1703,7 +1705,7 @@ close_isarstate(struct BCState *bcs)
1703 del_timer(&bcs->hw.isar.ftimer); 1705 del_timer(&bcs->hw.isar.ftimer);
1704} 1706}
1705 1707
1706int 1708static int
1707open_isarstate(struct IsdnCardState *cs, struct BCState *bcs) 1709open_isarstate(struct IsdnCardState *cs, struct BCState *bcs)
1708{ 1710{
1709 if (!test_and_set_bit(BC_FLG_INIT, &bcs->Flag)) { 1711 if (!test_and_set_bit(BC_FLG_INIT, &bcs->Flag)) {
@@ -1725,7 +1727,7 @@ open_isarstate(struct IsdnCardState *cs, struct BCState *bcs)
1725 return (0); 1727 return (0);
1726} 1728}
1727 1729
1728int 1730static int
1729setstack_isar(struct PStack *st, struct BCState *bcs) 1731setstack_isar(struct PStack *st, struct BCState *bcs)
1730{ 1732{
1731 bcs->channel = st->l1.bc; 1733 bcs->channel = st->l1.bc;