diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-06-25 17:59:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:25:07 -0400 |
commit | 672c3fd9069e5a138f9d4afc9aeb5aa34aacce32 (patch) | |
tree | eed95f7e577680c4a92e7f22b22b221b53934fd1 /drivers/isdn/hisax/isar.c | |
parent | 8b3d4a2a3ef9488d4477e8823106abfd6039eb66 (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.c | 46 |
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 |
24 | const u_char faxmodulation[] = {3,24,48,72,73,74,96,97,98,121,122,145,146}; | 24 | static const u_char faxmodulation[] = {3,24,48,72,73,74,96,97,98,121,122,145,146}; |
25 | static u_int modmask = 0x1fff; | 25 | static u_int modmask = 0x1fff; |
26 | static int frm_extra_delay = 2; | 26 | static int frm_extra_delay = 2; |
27 | static int para_TOA = 6; | 27 | static int para_TOA = 6; |
28 | const u_char *FC1_CMD[] = {"FAE", "FTS", "FRS", "FTM", "FRM", "FTH", "FRH", "CTRL" }; | 28 | static const u_char *FC1_CMD[] = {"FAE", "FTS", "FRS", "FTM", "FRM", "FTH", "FRH", "CTRL" }; |
29 | 29 | ||
30 | void isar_setup(struct IsdnCardState *cs); | 30 | static void isar_setup(struct IsdnCardState *cs); |
31 | static void isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para); | 31 | static void isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para); |
32 | static void ll_deliver_faxstat(struct BCState *bcs, u_char status); | 32 | static 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 | ||
48 | int | 48 | static int |
49 | sendmsg(struct IsdnCardState *cs, u_char his, u_char creg, u_char len, | 49 | sendmsg(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 !!! */ |
88 | inline void | 88 | static inline void |
89 | rcv_mbox(struct IsdnCardState *cs, struct isar_reg *ireg, u_char *msg) | 89 | rcv_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 !!! */ |
117 | inline void | 117 | static inline void |
118 | get_irq_infos(struct IsdnCardState *cs, struct isar_reg *ireg) | 118 | get_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 | ||
130 | int | 130 | static int |
131 | waitrecmsg(struct IsdnCardState *cs, u_char *len, | 131 | waitrecmsg(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 | ||
188 | int | 188 | static int |
189 | isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf) | 189 | isar_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 | ||
742 | inline | 742 | static inline |
743 | struct BCState *sel_bcs_isar(struct IsdnCardState *cs, u_char dpath) | 743 | struct 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 | ||
754 | void | 754 | static void |
755 | send_frames(struct BCState *bcs) | 755 | send_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 | ||
809 | inline void | 809 | static inline void |
810 | check_send(struct IsdnCardState *cs, u_char rdm) | 810 | check_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 | ||
831 | const char *dmril[] = {"NO SPEED", "1200/75", "NODEF2", "75/1200", "NODEF4", | 831 | static 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", |
834 | const char *dmrim[] = {"NO MOD", "NO DEF", "V32/V32b", "V22", "V21", | 834 | "14400", "WRONG"}; |
835 | "Bell103", "V23", "Bell202", "V17", "V29", "V27ter"}; | 835 | static const char *dmrim[] = {"NO MOD", "NO DEF", "V32/V32b", "V22", "V21", |
836 | "Bell103", "V23", "Bell202", "V17", "V29", | ||
837 | "V27ter"}; | ||
836 | 838 | ||
837 | static void | 839 | static void |
838 | isar_pump_status_rsp(struct BCState *bcs, struct isar_reg *ireg) { | 840 | isar_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 | ||
1391 | int | 1393 | static int |
1392 | modeisar(struct BCState *bcs, int mode, int bc) | 1394 | modeisar(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 | ||
1565 | void | 1567 | static void |
1566 | isar_setup(struct IsdnCardState *cs) | 1568 | isar_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 | ||
1585 | void | 1587 | static void |
1586 | isar_l2l1(struct PStack *st, int pr, void *arg) | 1588 | isar_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 | ||
1684 | void | 1686 | static void |
1685 | close_isarstate(struct BCState *bcs) | 1687 | close_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 | ||
1706 | int | 1708 | static int |
1707 | open_isarstate(struct IsdnCardState *cs, struct BCState *bcs) | 1709 | open_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 | ||
1728 | int | 1730 | static int |
1729 | setstack_isar(struct PStack *st, struct BCState *bcs) | 1731 | setstack_isar(struct PStack *st, struct BCState *bcs) |
1730 | { | 1732 | { |
1731 | bcs->channel = st->l1.bc; | 1733 | bcs->channel = st->l1.bc; |