X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fisdn%2Fhisax%2Fconfig.c;h=17ec0b70ba1d0a9a598770e63284202f797a30b0;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=9280b581fa00f6ad34049d37e3718a188a84504c;hpb=7172c64a7cee4dfa95864f49c914f7ea8cf497c8;p=linux-2.6.git diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index 9280b581f..17ec0b70b 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c @@ -227,14 +227,6 @@ const char *CardType[] = { #define DEFAULT_CFG {5,0x2E0,0,0} #endif - -#ifdef CONFIG_HISAX_AMD7930 -#undef DEFAULT_CARD -#undef DEFAULT_CFG -#define DEFAULT_CARD ISDN_CTYPE_AMD7930 -#define DEFAULT_CFG {12,0x3e0,0,0} -#endif - #ifdef CONFIG_HISAX_NICCY #undef DEFAULT_CARD #undef DEFAULT_CFG @@ -545,10 +537,6 @@ extern int setup_hfcpci(struct IsdnCard *card); extern int setup_hfcsx(struct IsdnCard *card); #endif -#if CARD_AMD7930 -extern int setup_amd7930(struct IsdnCard *card); -#endif - #if CARD_NICCY extern int setup_niccy(struct IsdnCard *card); #endif @@ -869,14 +857,13 @@ static int checkcard(int cardnr, char *id, int *busy_flag, struct module *lockow struct IsdnCard *card = cards + cardnr; struct IsdnCardState *cs; - cs = kmalloc(sizeof(struct IsdnCardState), GFP_ATOMIC); + cs = kzalloc(sizeof(struct IsdnCardState), GFP_ATOMIC); if (!cs) { printk(KERN_WARNING "HiSax: No memory for IsdnCardState(card %d)\n", cardnr + 1); goto out; } - memset(cs, 0, sizeof(struct IsdnCardState)); card->cs = cs; spin_lock_init(&cs->statlock); spin_lock_init(&cs->lock); @@ -1064,11 +1051,6 @@ static int checkcard(int cardnr, char *id, int *busy_flag, struct module *lockow ret = setup_niccy(card); break; #endif -#if CARD_AMD7930 - case ISDN_CTYPE_AMD7930: - ret = setup_amd7930(card); - break; -#endif #if CARD_ISURF case ISDN_CTYPE_ISURF: ret = setup_isurf(card); @@ -1137,7 +1119,6 @@ static int checkcard(int cardnr, char *id, int *busy_flag, struct module *lockow cs->tx_skb = NULL; cs->tx_cnt = 0; cs->event = 0; - cs->tqueue.data = cs; skb_queue_head_init(&cs->rq); skb_queue_head_init(&cs->sq); @@ -1438,7 +1419,6 @@ static int __init HiSax_init(void) break; case ISDN_CTYPE_ELSA_PCI: case ISDN_CTYPE_NETJET_S: - case ISDN_CTYPE_AMD7930: case ISDN_CTYPE_TELESPCI: case ISDN_CTYPE_W6692: case ISDN_CTYPE_NETJET_U: @@ -1554,7 +1534,7 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg); static int hisax_cardmsg(struct IsdnCardState *cs, int mt, void *arg); static int hisax_bc_setstack(struct PStack *st, struct BCState *bcs); static void hisax_bc_close(struct BCState *bcs); -static void hisax_bh(struct IsdnCardState *cs); +static void hisax_bh(struct work_struct *work); static void EChannel_proc_rcv(struct hisax_d_if *d_if); int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[], @@ -1586,7 +1566,7 @@ int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[], hisax_d_if->cs = cs; cs->hw.hisax_d_if = hisax_d_if; cs->cardmsg = hisax_cardmsg; - INIT_WORK(&cs->tqueue, (void *)(void *)hisax_bh, cs); + INIT_WORK(&cs->tqueue, hisax_bh); cs->channel[0].d_st->l2.l2l1 = hisax_d_l2l1; for (i = 0; i < 2; i++) { cs->bcs[i].BC_SetStack = hisax_bc_setstack; @@ -1618,8 +1598,10 @@ static void hisax_sched_event(struct IsdnCardState *cs, int event) schedule_work(&cs->tqueue); } -static void hisax_bh(struct IsdnCardState *cs) +static void hisax_bh(struct work_struct *work) { + struct IsdnCardState *cs = + container_of(work, struct IsdnCardState, tqueue); struct PStack *st; int pr; @@ -1723,11 +1705,11 @@ static void hisax_b_l1l2(struct hisax_if *ifc, int pr, void *arg) hisax_b_sched_event(bcs, B_RCVBUFREADY); break; case PH_DATA | CONFIRM: - bcs->tx_cnt -= (int) arg; + bcs->tx_cnt -= (long)arg; if (test_bit(FLG_LLI_L1WAKEUP,&bcs->st->lli.flag)) { u_long flags; spin_lock_irqsave(&bcs->aclock, flags); - bcs->ackcnt += (int) arg; + bcs->ackcnt += (long)arg; spin_unlock_irqrestore(&bcs->aclock, flags); schedule_event(bcs, B_ACKPENDING); } @@ -1791,7 +1773,7 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg) switch (pr) { case PH_ACTIVATE | REQUEST: - B_L2L1(b_if, pr, (void *) st->l1.mode); + B_L2L1(b_if, pr, (void *)(unsigned long)st->l1.mode); break; case PH_DATA | REQUEST: case PH_PULL | INDICATION: