Skip to content

Commit

Permalink
[PATCH] drivers/isdn/hisax/: possible cleanups
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Bunk authored and Linus Torvalds committed Jun 25, 2005
1 parent 8b3d4a2 commit 672c3fd
Show file tree
Hide file tree
Showing 60 changed files with 263 additions and 1,050 deletions.
2 changes: 1 addition & 1 deletion drivers/isdn/hisax/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions drivers/isdn/hisax/amd7930_fn.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ static WORD initAMD[] = {
};


void /* macro wWordAMD */
static void /* macro wWordAMD */
WriteWordAmd7930(struct IsdnCardState *cs, BYTE reg, WORD val)
{
wByteAMD(cs, 0x00, reg);
wByteAMD(cs, 0x01, LOBYTE(val));
wByteAMD(cs, 0x01, HIBYTE(val));
}

WORD /* macro rWordAMD */
static WORD /* macro rWordAMD */
ReadWordAmd7930(struct IsdnCardState *cs, BYTE reg)
{
WORD res;
Expand Down Expand Up @@ -665,7 +665,7 @@ Amd7930_l1hw(struct PStack *st, int pr, void *arg)
}
}

void
static void
setstack_Amd7930(struct PStack *st, struct IsdnCardState *cs)
{

Expand All @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions drivers/isdn/hisax/asuscom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -239,7 +239,7 @@ asuscom_interrupt_ipac(int intno, void *dev_id, struct pt_regs *regs)
return IRQ_HANDLED;
}

void
static void
release_io_asuscom(struct IsdnCardState *cs)
{
int bytecnt = 8;
Expand Down
18 changes: 10 additions & 8 deletions drivers/isdn/hisax/avm_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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)) {
Expand Down Expand Up @@ -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;
Expand All @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/isdn/hisax/bkm_a4t.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions drivers/isdn/hisax/bkm_a8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] =
{
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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")) {
Expand Down
6 changes: 3 additions & 3 deletions drivers/isdn/hisax/callc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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)) {
Expand Down
14 changes: 8 additions & 6 deletions drivers/isdn/hisax/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, };
Expand Down Expand Up @@ -391,7 +391,7 @@ char *HiSax_getrev(const char *revision)
return rev;
}

void __init HiSaxVersion(void)
static void __init HiSaxVersion(void)
{
char tmp[64];

Expand Down Expand Up @@ -608,15 +608,17 @@ 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))
if (cards[cardnr - 1].cs)
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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -1184,15 +1186,15 @@ 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;

for (i = idx; i < (HISAX_MAX_CARDS - 1); i++)
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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/isdn/hisax/diva.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions drivers/isdn/hisax/elsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@

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"};

Expand Down Expand Up @@ -425,7 +425,7 @@ elsa_interrupt_ipac(int intno, void *dev_id, struct pt_regs *regs)
return IRQ_HANDLED;
}

void
static void
release_io_elsa(struct IsdnCardState *cs)
{
int bytecnt = 8;
Expand Down
Loading

0 comments on commit 672c3fd

Please sign in to comment.