diff options
author | Dave Jones <davej@redhat.com> | 2006-12-12 17:41:41 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-12-12 17:41:41 -0500 |
commit | c4366889dda8110247be59ca41fddb82951a8c26 (patch) | |
tree | 705c1a996bed8fd48ce94ff33ec9fd00f9b94875 /drivers/isdn/hisax | |
parent | db2fb9db5735cc532fd4fc55e94b9a3c3750378e (diff) | |
parent | e1036502e5263851259d147771226161e5ccc85a (diff) |
Merge ../linus
Conflicts:
drivers/cpufreq/cpufreq.c
Diffstat (limited to 'drivers/isdn/hisax')
30 files changed, 125 insertions, 218 deletions
diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig index eb57a988e048..34ab5f7dcabc 100644 --- a/drivers/isdn/hisax/Kconfig +++ b/drivers/isdn/hisax/Kconfig | |||
@@ -110,7 +110,7 @@ config HISAX_16_3 | |||
110 | 110 | ||
111 | config HISAX_TELESPCI | 111 | config HISAX_TELESPCI |
112 | bool "Teles PCI" | 112 | bool "Teles PCI" |
113 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || FRV)) | 113 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) |
114 | help | 114 | help |
115 | This enables HiSax support for the Teles PCI. | 115 | This enables HiSax support for the Teles PCI. |
116 | See <file:Documentation/isdn/README.HiSax> on how to configure it. | 116 | See <file:Documentation/isdn/README.HiSax> on how to configure it. |
@@ -238,7 +238,7 @@ config HISAX_MIC | |||
238 | 238 | ||
239 | config HISAX_NETJET | 239 | config HISAX_NETJET |
240 | bool "NETjet card" | 240 | bool "NETjet card" |
241 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || FRV)) | 241 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) |
242 | help | 242 | help |
243 | This enables HiSax support for the NetJet from Traverse | 243 | This enables HiSax support for the NetJet from Traverse |
244 | Technologies. | 244 | Technologies. |
@@ -249,7 +249,7 @@ config HISAX_NETJET | |||
249 | 249 | ||
250 | config HISAX_NETJET_U | 250 | config HISAX_NETJET_U |
251 | bool "NETspider U card" | 251 | bool "NETspider U card" |
252 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || FRV)) | 252 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) |
253 | help | 253 | help |
254 | This enables HiSax support for the Netspider U interface ISDN card | 254 | This enables HiSax support for the Netspider U interface ISDN card |
255 | from Traverse Technologies. | 255 | from Traverse Technologies. |
@@ -317,7 +317,7 @@ config HISAX_GAZEL | |||
317 | 317 | ||
318 | config HISAX_HFC_PCI | 318 | config HISAX_HFC_PCI |
319 | bool "HFC PCI-Bus cards" | 319 | bool "HFC PCI-Bus cards" |
320 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || FRV)) | 320 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) |
321 | help | 321 | help |
322 | This enables HiSax support for the HFC-S PCI 2BDS0 based cards. | 322 | This enables HiSax support for the HFC-S PCI 2BDS0 based cards. |
323 | 323 | ||
@@ -344,18 +344,11 @@ config HISAX_HFC_SX | |||
344 | 344 | ||
345 | config HISAX_ENTERNOW_PCI | 345 | config HISAX_ENTERNOW_PCI |
346 | bool "Formula-n enter:now PCI card" | 346 | bool "Formula-n enter:now PCI card" |
347 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || FRV)) | 347 | depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) |
348 | help | 348 | help |
349 | This enables HiSax support for the Formula-n enter:now PCI | 349 | This enables HiSax support for the Formula-n enter:now PCI |
350 | ISDN card. | 350 | ISDN card. |
351 | 351 | ||
352 | config HISAX_AMD7930 | ||
353 | bool "Am7930 (EXPERIMENTAL)" | ||
354 | depends on EXPERIMENTAL && SPARC && BROKEN | ||
355 | help | ||
356 | This enables HiSax support for the AMD7930 chips on some SPARCs. | ||
357 | This code is not finished yet. | ||
358 | |||
359 | endif | 352 | endif |
360 | 353 | ||
361 | if ISDN_DRV_HISAX | 354 | if ISDN_DRV_HISAX |
@@ -402,6 +395,7 @@ config HISAX_ST5481 | |||
402 | tristate "ST5481 USB ISDN modem (EXPERIMENTAL)" | 395 | tristate "ST5481 USB ISDN modem (EXPERIMENTAL)" |
403 | depends on USB && EXPERIMENTAL | 396 | depends on USB && EXPERIMENTAL |
404 | select CRC_CCITT | 397 | select CRC_CCITT |
398 | select BITREVERSE | ||
405 | help | 399 | help |
406 | This enables the driver for ST5481 based USB ISDN adapters, | 400 | This enables the driver for ST5481 based USB ISDN adapters, |
407 | e.g. the BeWan Gazel 128 USB | 401 | e.g. the BeWan Gazel 128 USB |
diff --git a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c index bec59010bc66..3b19caeba258 100644 --- a/drivers/isdn/hisax/amd7930_fn.c +++ b/drivers/isdn/hisax/amd7930_fn.c | |||
@@ -232,9 +232,10 @@ Amd7930_new_ph(struct IsdnCardState *cs) | |||
232 | 232 | ||
233 | 233 | ||
234 | static void | 234 | static void |
235 | Amd7930_bh(struct IsdnCardState *cs) | 235 | Amd7930_bh(struct work_struct *work) |
236 | { | 236 | { |
237 | 237 | struct IsdnCardState *cs = | |
238 | container_of(work, struct IsdnCardState, tqueue); | ||
238 | struct PStack *stptr; | 239 | struct PStack *stptr; |
239 | 240 | ||
240 | if (!cs) | 241 | if (!cs) |
@@ -789,7 +790,7 @@ Amd7930_init(struct IsdnCardState *cs) | |||
789 | void __devinit | 790 | void __devinit |
790 | setup_Amd7930(struct IsdnCardState *cs) | 791 | setup_Amd7930(struct IsdnCardState *cs) |
791 | { | 792 | { |
792 | INIT_WORK(&cs->tqueue, (void *)(void *) Amd7930_bh, cs); | 793 | INIT_WORK(&cs->tqueue, Amd7930_bh); |
793 | cs->dbusytimer.function = (void *) dbusy_timer_handler; | 794 | cs->dbusytimer.function = (void *) dbusy_timer_handler; |
794 | cs->dbusytimer.data = (long) cs; | 795 | cs->dbusytimer.data = (long) cs; |
795 | init_timer(&cs->dbusytimer); | 796 | init_timer(&cs->dbusytimer); |
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c index ac28e3278ad9..9e70c206779e 100644 --- a/drivers/isdn/hisax/avma1_cs.c +++ b/drivers/isdn/hisax/avma1_cs.c | |||
@@ -123,11 +123,10 @@ static int avma1cs_probe(struct pcmcia_device *p_dev) | |||
123 | DEBUG(0, "avma1cs_attach()\n"); | 123 | DEBUG(0, "avma1cs_attach()\n"); |
124 | 124 | ||
125 | /* Allocate space for private device-specific data */ | 125 | /* Allocate space for private device-specific data */ |
126 | local = kmalloc(sizeof(local_info_t), GFP_KERNEL); | 126 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); |
127 | if (!local) | 127 | if (!local) |
128 | return -ENOMEM; | 128 | return -ENOMEM; |
129 | 129 | ||
130 | memset(local, 0, sizeof(local_info_t)); | ||
131 | p_dev->priv = local; | 130 | p_dev->priv = local; |
132 | 131 | ||
133 | /* The io structure describes IO port mapping */ | 132 | /* The io structure describes IO port mapping */ |
@@ -216,41 +215,11 @@ static int avma1cs_config(struct pcmcia_device *link) | |||
216 | 215 | ||
217 | DEBUG(0, "avma1cs_config(0x%p)\n", link); | 216 | DEBUG(0, "avma1cs_config(0x%p)\n", link); |
218 | 217 | ||
219 | /* | ||
220 | This reads the card's CONFIG tuple to find its configuration | ||
221 | registers. | ||
222 | */ | ||
223 | do { | 218 | do { |
224 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
225 | i = pcmcia_get_first_tuple(link, &tuple); | ||
226 | if (i != CS_SUCCESS) break; | ||
227 | tuple.TupleData = buf; | ||
228 | tuple.TupleDataMax = 64; | ||
229 | tuple.TupleOffset = 0; | ||
230 | i = pcmcia_get_tuple_data(link, &tuple); | ||
231 | if (i != CS_SUCCESS) break; | ||
232 | i = pcmcia_parse_tuple(link, &tuple, &parse); | ||
233 | if (i != CS_SUCCESS) break; | ||
234 | link->conf.ConfigBase = parse.config.base; | ||
235 | } while (0); | ||
236 | if (i != CS_SUCCESS) { | ||
237 | cs_error(link, ParseTuple, i); | ||
238 | return -ENODEV; | ||
239 | } | ||
240 | |||
241 | do { | ||
242 | |||
243 | tuple.Attributes = 0; | ||
244 | tuple.TupleData = buf; | ||
245 | tuple.TupleDataMax = 254; | ||
246 | tuple.TupleOffset = 0; | ||
247 | tuple.DesiredTuple = CISTPL_VERS_1; | ||
248 | |||
249 | devname[0] = 0; | 219 | devname[0] = 0; |
250 | if( !first_tuple(link, &tuple, &parse) && parse.version_1.ns > 1 ) { | 220 | if (link->prod_id[1]) |
251 | strlcpy(devname,parse.version_1.str + parse.version_1.ofs[1], | 221 | strlcpy(devname, link->prod_id[1], sizeof(devname)); |
252 | sizeof(devname)); | 222 | |
253 | } | ||
254 | /* | 223 | /* |
255 | * find IO port | 224 | * find IO port |
256 | */ | 225 | */ |
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index e4823ab2b127..17ec0b70ba1d 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c | |||
@@ -227,14 +227,6 @@ const char *CardType[] = { | |||
227 | #define DEFAULT_CFG {5,0x2E0,0,0} | 227 | #define DEFAULT_CFG {5,0x2E0,0,0} |
228 | #endif | 228 | #endif |
229 | 229 | ||
230 | |||
231 | #ifdef CONFIG_HISAX_AMD7930 | ||
232 | #undef DEFAULT_CARD | ||
233 | #undef DEFAULT_CFG | ||
234 | #define DEFAULT_CARD ISDN_CTYPE_AMD7930 | ||
235 | #define DEFAULT_CFG {12,0x3e0,0,0} | ||
236 | #endif | ||
237 | |||
238 | #ifdef CONFIG_HISAX_NICCY | 230 | #ifdef CONFIG_HISAX_NICCY |
239 | #undef DEFAULT_CARD | 231 | #undef DEFAULT_CARD |
240 | #undef DEFAULT_CFG | 232 | #undef DEFAULT_CFG |
@@ -545,10 +537,6 @@ extern int setup_hfcpci(struct IsdnCard *card); | |||
545 | extern int setup_hfcsx(struct IsdnCard *card); | 537 | extern int setup_hfcsx(struct IsdnCard *card); |
546 | #endif | 538 | #endif |
547 | 539 | ||
548 | #if CARD_AMD7930 | ||
549 | extern int setup_amd7930(struct IsdnCard *card); | ||
550 | #endif | ||
551 | |||
552 | #if CARD_NICCY | 540 | #if CARD_NICCY |
553 | extern int setup_niccy(struct IsdnCard *card); | 541 | extern int setup_niccy(struct IsdnCard *card); |
554 | #endif | 542 | #endif |
@@ -631,7 +619,8 @@ static int HiSax_readstatus(u_char __user *buf, int len, int id, int channel) | |||
631 | count = cs->status_end - cs->status_read + 1; | 619 | count = cs->status_end - cs->status_read + 1; |
632 | if (count >= len) | 620 | if (count >= len) |
633 | count = len; | 621 | count = len; |
634 | copy_to_user(p, cs->status_read, count); | 622 | if (copy_to_user(p, cs->status_read, count)) |
623 | return -EFAULT; | ||
635 | cs->status_read += count; | 624 | cs->status_read += count; |
636 | if (cs->status_read > cs->status_end) | 625 | if (cs->status_read > cs->status_end) |
637 | cs->status_read = cs->status_buf; | 626 | cs->status_read = cs->status_buf; |
@@ -642,7 +631,8 @@ static int HiSax_readstatus(u_char __user *buf, int len, int id, int channel) | |||
642 | cnt = HISAX_STATUS_BUFSIZE; | 631 | cnt = HISAX_STATUS_BUFSIZE; |
643 | else | 632 | else |
644 | cnt = count; | 633 | cnt = count; |
645 | copy_to_user(p, cs->status_read, cnt); | 634 | if (copy_to_user(p, cs->status_read, cnt)) |
635 | return -EFAULT; | ||
646 | p += cnt; | 636 | p += cnt; |
647 | cs->status_read += cnt % HISAX_STATUS_BUFSIZE; | 637 | cs->status_read += cnt % HISAX_STATUS_BUFSIZE; |
648 | count -= cnt; | 638 | count -= cnt; |
@@ -867,14 +857,13 @@ static int checkcard(int cardnr, char *id, int *busy_flag, struct module *lockow | |||
867 | struct IsdnCard *card = cards + cardnr; | 857 | struct IsdnCard *card = cards + cardnr; |
868 | struct IsdnCardState *cs; | 858 | struct IsdnCardState *cs; |
869 | 859 | ||
870 | cs = kmalloc(sizeof(struct IsdnCardState), GFP_ATOMIC); | 860 | cs = kzalloc(sizeof(struct IsdnCardState), GFP_ATOMIC); |
871 | if (!cs) { | 861 | if (!cs) { |
872 | printk(KERN_WARNING | 862 | printk(KERN_WARNING |
873 | "HiSax: No memory for IsdnCardState(card %d)\n", | 863 | "HiSax: No memory for IsdnCardState(card %d)\n", |
874 | cardnr + 1); | 864 | cardnr + 1); |
875 | goto out; | 865 | goto out; |
876 | } | 866 | } |
877 | memset(cs, 0, sizeof(struct IsdnCardState)); | ||
878 | card->cs = cs; | 867 | card->cs = cs; |
879 | spin_lock_init(&cs->statlock); | 868 | spin_lock_init(&cs->statlock); |
880 | spin_lock_init(&cs->lock); | 869 | spin_lock_init(&cs->lock); |
@@ -1062,11 +1051,6 @@ static int checkcard(int cardnr, char *id, int *busy_flag, struct module *lockow | |||
1062 | ret = setup_niccy(card); | 1051 | ret = setup_niccy(card); |
1063 | break; | 1052 | break; |
1064 | #endif | 1053 | #endif |
1065 | #if CARD_AMD7930 | ||
1066 | case ISDN_CTYPE_AMD7930: | ||
1067 | ret = setup_amd7930(card); | ||
1068 | break; | ||
1069 | #endif | ||
1070 | #if CARD_ISURF | 1054 | #if CARD_ISURF |
1071 | case ISDN_CTYPE_ISURF: | 1055 | case ISDN_CTYPE_ISURF: |
1072 | ret = setup_isurf(card); | 1056 | ret = setup_isurf(card); |
@@ -1135,7 +1119,6 @@ static int checkcard(int cardnr, char *id, int *busy_flag, struct module *lockow | |||
1135 | cs->tx_skb = NULL; | 1119 | cs->tx_skb = NULL; |
1136 | cs->tx_cnt = 0; | 1120 | cs->tx_cnt = 0; |
1137 | cs->event = 0; | 1121 | cs->event = 0; |
1138 | cs->tqueue.data = cs; | ||
1139 | 1122 | ||
1140 | skb_queue_head_init(&cs->rq); | 1123 | skb_queue_head_init(&cs->rq); |
1141 | skb_queue_head_init(&cs->sq); | 1124 | skb_queue_head_init(&cs->sq); |
@@ -1436,7 +1419,6 @@ static int __init HiSax_init(void) | |||
1436 | break; | 1419 | break; |
1437 | case ISDN_CTYPE_ELSA_PCI: | 1420 | case ISDN_CTYPE_ELSA_PCI: |
1438 | case ISDN_CTYPE_NETJET_S: | 1421 | case ISDN_CTYPE_NETJET_S: |
1439 | case ISDN_CTYPE_AMD7930: | ||
1440 | case ISDN_CTYPE_TELESPCI: | 1422 | case ISDN_CTYPE_TELESPCI: |
1441 | case ISDN_CTYPE_W6692: | 1423 | case ISDN_CTYPE_W6692: |
1442 | case ISDN_CTYPE_NETJET_U: | 1424 | case ISDN_CTYPE_NETJET_U: |
@@ -1552,7 +1534,7 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg); | |||
1552 | static int hisax_cardmsg(struct IsdnCardState *cs, int mt, void *arg); | 1534 | static int hisax_cardmsg(struct IsdnCardState *cs, int mt, void *arg); |
1553 | static int hisax_bc_setstack(struct PStack *st, struct BCState *bcs); | 1535 | static int hisax_bc_setstack(struct PStack *st, struct BCState *bcs); |
1554 | static void hisax_bc_close(struct BCState *bcs); | 1536 | static void hisax_bc_close(struct BCState *bcs); |
1555 | static void hisax_bh(struct IsdnCardState *cs); | 1537 | static void hisax_bh(struct work_struct *work); |
1556 | static void EChannel_proc_rcv(struct hisax_d_if *d_if); | 1538 | static void EChannel_proc_rcv(struct hisax_d_if *d_if); |
1557 | 1539 | ||
1558 | int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[], | 1540 | int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[], |
@@ -1584,7 +1566,7 @@ int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[], | |||
1584 | hisax_d_if->cs = cs; | 1566 | hisax_d_if->cs = cs; |
1585 | cs->hw.hisax_d_if = hisax_d_if; | 1567 | cs->hw.hisax_d_if = hisax_d_if; |
1586 | cs->cardmsg = hisax_cardmsg; | 1568 | cs->cardmsg = hisax_cardmsg; |
1587 | INIT_WORK(&cs->tqueue, (void *)(void *)hisax_bh, cs); | 1569 | INIT_WORK(&cs->tqueue, hisax_bh); |
1588 | cs->channel[0].d_st->l2.l2l1 = hisax_d_l2l1; | 1570 | cs->channel[0].d_st->l2.l2l1 = hisax_d_l2l1; |
1589 | for (i = 0; i < 2; i++) { | 1571 | for (i = 0; i < 2; i++) { |
1590 | cs->bcs[i].BC_SetStack = hisax_bc_setstack; | 1572 | cs->bcs[i].BC_SetStack = hisax_bc_setstack; |
@@ -1616,8 +1598,10 @@ static void hisax_sched_event(struct IsdnCardState *cs, int event) | |||
1616 | schedule_work(&cs->tqueue); | 1598 | schedule_work(&cs->tqueue); |
1617 | } | 1599 | } |
1618 | 1600 | ||
1619 | static void hisax_bh(struct IsdnCardState *cs) | 1601 | static void hisax_bh(struct work_struct *work) |
1620 | { | 1602 | { |
1603 | struct IsdnCardState *cs = | ||
1604 | container_of(work, struct IsdnCardState, tqueue); | ||
1621 | struct PStack *st; | 1605 | struct PStack *st; |
1622 | int pr; | 1606 | int pr; |
1623 | 1607 | ||
diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c index 7e95f04f13da..6eebeb441bfd 100644 --- a/drivers/isdn/hisax/diva.c +++ b/drivers/isdn/hisax/diva.c | |||
@@ -716,8 +716,10 @@ release_io_diva(struct IsdnCardState *cs) | |||
716 | 716 | ||
717 | *cfg = 0; /* disable INT0/1 */ | 717 | *cfg = 0; /* disable INT0/1 */ |
718 | *cfg = 2; /* reset pending INT0 */ | 718 | *cfg = 2; /* reset pending INT0 */ |
719 | iounmap((void *)cs->hw.diva.cfg_reg); | 719 | if (cs->hw.diva.cfg_reg) |
720 | iounmap((void *)cs->hw.diva.pci_cfg); | 720 | iounmap((void *)cs->hw.diva.cfg_reg); |
721 | if (cs->hw.diva.pci_cfg) | ||
722 | iounmap((void *)cs->hw.diva.pci_cfg); | ||
721 | return; | 723 | return; |
722 | } else if (cs->subtyp != DIVA_IPAC_ISA) { | 724 | } else if (cs->subtyp != DIVA_IPAC_ISA) { |
723 | del_timer(&cs->hw.diva.tl); | 725 | del_timer(&cs->hw.diva.tl); |
@@ -734,6 +736,23 @@ release_io_diva(struct IsdnCardState *cs) | |||
734 | } | 736 | } |
735 | 737 | ||
736 | static void | 738 | static void |
739 | iounmap_diva(struct IsdnCardState *cs) | ||
740 | { | ||
741 | if ((cs->subtyp == DIVA_IPAC_PCI) || (cs->subtyp == DIVA_IPACX_PCI)) { | ||
742 | if (cs->hw.diva.cfg_reg) { | ||
743 | iounmap((void *)cs->hw.diva.cfg_reg); | ||
744 | cs->hw.diva.cfg_reg = 0; | ||
745 | } | ||
746 | if (cs->hw.diva.pci_cfg) { | ||
747 | iounmap((void *)cs->hw.diva.pci_cfg); | ||
748 | cs->hw.diva.pci_cfg = 0; | ||
749 | } | ||
750 | } | ||
751 | |||
752 | return; | ||
753 | } | ||
754 | |||
755 | static void | ||
737 | reset_diva(struct IsdnCardState *cs) | 756 | reset_diva(struct IsdnCardState *cs) |
738 | { | 757 | { |
739 | if (cs->subtyp == DIVA_IPAC_ISA) { | 758 | if (cs->subtyp == DIVA_IPAC_ISA) { |
@@ -1069,11 +1088,13 @@ setup_diva(struct IsdnCard *card) | |||
1069 | 1088 | ||
1070 | if (!cs->irq) { | 1089 | if (!cs->irq) { |
1071 | printk(KERN_WARNING "Diva: No IRQ for PCI card found\n"); | 1090 | printk(KERN_WARNING "Diva: No IRQ for PCI card found\n"); |
1091 | iounmap_diva(cs); | ||
1072 | return(0); | 1092 | return(0); |
1073 | } | 1093 | } |
1074 | 1094 | ||
1075 | if (!cs->hw.diva.cfg_reg) { | 1095 | if (!cs->hw.diva.cfg_reg) { |
1076 | printk(KERN_WARNING "Diva: No IO-Adr for PCI card found\n"); | 1096 | printk(KERN_WARNING "Diva: No IO-Adr for PCI card found\n"); |
1097 | iounmap_diva(cs); | ||
1077 | return(0); | 1098 | return(0); |
1078 | } | 1099 | } |
1079 | cs->irq_flags |= IRQF_SHARED; | 1100 | cs->irq_flags |= IRQF_SHARED; |
@@ -1100,7 +1121,11 @@ setup_diva(struct IsdnCard *card) | |||
1100 | bytecnt = 32; | 1121 | bytecnt = 32; |
1101 | } | 1122 | } |
1102 | } | 1123 | } |
1124 | |||
1125 | #ifdef __ISAPNP__ | ||
1103 | ready: | 1126 | ready: |
1127 | #endif | ||
1128 | |||
1104 | printk(KERN_INFO | 1129 | printk(KERN_INFO |
1105 | "Diva: %s card configured at %#lx IRQ %d\n", | 1130 | "Diva: %s card configured at %#lx IRQ %d\n", |
1106 | (cs->subtyp == DIVA_PCI) ? "PCI" : | 1131 | (cs->subtyp == DIVA_PCI) ? "PCI" : |
@@ -1123,6 +1148,7 @@ ready: | |||
1123 | CardType[card->typ], | 1148 | CardType[card->typ], |
1124 | cs->hw.diva.cfg_reg, | 1149 | cs->hw.diva.cfg_reg, |
1125 | cs->hw.diva.cfg_reg + bytecnt); | 1150 | cs->hw.diva.cfg_reg + bytecnt); |
1151 | iounmap_diva(cs); | ||
1126 | return (0); | 1152 | return (0); |
1127 | } | 1153 | } |
1128 | } | 1154 | } |
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c index e18e75be8ed3..79ab9dda7d08 100644 --- a/drivers/isdn/hisax/elsa_cs.c +++ b/drivers/isdn/hisax/elsa_cs.c | |||
@@ -146,9 +146,8 @@ static int elsa_cs_probe(struct pcmcia_device *link) | |||
146 | DEBUG(0, "elsa_cs_attach()\n"); | 146 | DEBUG(0, "elsa_cs_attach()\n"); |
147 | 147 | ||
148 | /* Allocate space for private device-specific data */ | 148 | /* Allocate space for private device-specific data */ |
149 | local = kmalloc(sizeof(local_info_t), GFP_KERNEL); | 149 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); |
150 | if (!local) return -ENOMEM; | 150 | if (!local) return -ENOMEM; |
151 | memset(local, 0, sizeof(local_info_t)); | ||
152 | 151 | ||
153 | local->p_dev = link; | 152 | local->p_dev = link; |
154 | link->priv = local; | 153 | link->priv = local; |
@@ -242,23 +241,6 @@ static int elsa_cs_config(struct pcmcia_device *link) | |||
242 | DEBUG(0, "elsa_config(0x%p)\n", link); | 241 | DEBUG(0, "elsa_config(0x%p)\n", link); |
243 | dev = link->priv; | 242 | dev = link->priv; |
244 | 243 | ||
245 | /* | ||
246 | This reads the card's CONFIG tuple to find its configuration | ||
247 | registers. | ||
248 | */ | ||
249 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
250 | tuple.TupleData = (cisdata_t *)buf; | ||
251 | tuple.TupleDataMax = 255; | ||
252 | tuple.TupleOffset = 0; | ||
253 | tuple.Attributes = 0; | ||
254 | i = first_tuple(link, &tuple, &parse); | ||
255 | if (i != CS_SUCCESS) { | ||
256 | last_fn = ParseTuple; | ||
257 | goto cs_failed; | ||
258 | } | ||
259 | link->conf.ConfigBase = parse.config.base; | ||
260 | link->conf.Present = parse.config.rmask[0]; | ||
261 | |||
262 | tuple.TupleData = (cisdata_t *)buf; | 244 | tuple.TupleData = (cisdata_t *)buf; |
263 | tuple.TupleOffset = 0; tuple.TupleDataMax = 255; | 245 | tuple.TupleOffset = 0; tuple.TupleDataMax = 255; |
264 | tuple.Attributes = 0; | 246 | tuple.Attributes = 0; |
diff --git a/drivers/isdn/hisax/fsm.c b/drivers/isdn/hisax/fsm.c index 0d44a3f480ac..34fade96a581 100644 --- a/drivers/isdn/hisax/fsm.c +++ b/drivers/isdn/hisax/fsm.c | |||
@@ -26,12 +26,10 @@ FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount) | |||
26 | int i; | 26 | int i; |
27 | 27 | ||
28 | fsm->jumpmatrix = (FSMFNPTR *) | 28 | fsm->jumpmatrix = (FSMFNPTR *) |
29 | kmalloc(sizeof (FSMFNPTR) * fsm->state_count * fsm->event_count, GFP_KERNEL); | 29 | kzalloc(sizeof (FSMFNPTR) * fsm->state_count * fsm->event_count, GFP_KERNEL); |
30 | if (!fsm->jumpmatrix) | 30 | if (!fsm->jumpmatrix) |
31 | return -ENOMEM; | 31 | return -ENOMEM; |
32 | 32 | ||
33 | memset(fsm->jumpmatrix, 0, sizeof (FSMFNPTR) * fsm->state_count * fsm->event_count); | ||
34 | |||
35 | for (i = 0; i < fncount; i++) | 33 | for (i = 0; i < fncount; i++) |
36 | if ((fnlist[i].state>=fsm->state_count) || (fnlist[i].event>=fsm->event_count)) { | 34 | if ((fnlist[i].state>=fsm->state_count) || (fnlist[i].event>=fsm->event_count)) { |
37 | printk(KERN_ERR "FsmNew Error line %d st(%ld/%ld) ev(%ld/%ld)\n", | 35 | printk(KERN_ERR "FsmNew Error line %d st(%ld/%ld) ev(%ld/%ld)\n", |
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c index d852c9d998b2..a2fa4ecb8c88 100644 --- a/drivers/isdn/hisax/hfc4s8s_l1.c +++ b/drivers/isdn/hisax/hfc4s8s_l1.c | |||
@@ -1083,8 +1083,9 @@ tx_b_frame(struct hfc4s8s_btype *bch) | |||
1083 | /* bottom half handler for interrupt */ | 1083 | /* bottom half handler for interrupt */ |
1084 | /*************************************/ | 1084 | /*************************************/ |
1085 | static void | 1085 | static void |
1086 | hfc4s8s_bh(hfc4s8s_hw * hw) | 1086 | hfc4s8s_bh(struct work_struct *work) |
1087 | { | 1087 | { |
1088 | hfc4s8s_hw *hw = container_of(work, hfc4s8s_hw, tqueue); | ||
1088 | u_char b; | 1089 | u_char b; |
1089 | struct hfc4s8s_l1 *l1p; | 1090 | struct hfc4s8s_l1 *l1p; |
1090 | volatile u_char *fifo_stat; | 1091 | volatile u_char *fifo_stat; |
@@ -1550,7 +1551,7 @@ setup_instance(hfc4s8s_hw * hw) | |||
1550 | goto out; | 1551 | goto out; |
1551 | } | 1552 | } |
1552 | 1553 | ||
1553 | INIT_WORK(&hw->tqueue, (void *) (void *) hfc4s8s_bh, hw); | 1554 | INIT_WORK(&hw->tqueue, hfc4s8s_bh); |
1554 | 1555 | ||
1555 | if (request_irq | 1556 | if (request_irq |
1556 | (hw->irq, hfc4s8s_interrupt, IRQF_SHARED, hw->card_name, hw)) { | 1557 | (hw->irq, hfc4s8s_interrupt, IRQF_SHARED, hw->card_name, hw)) { |
@@ -1590,11 +1591,10 @@ hfc4s8s_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1590 | hfc4s8s_param *driver_data = (hfc4s8s_param *) ent->driver_data; | 1591 | hfc4s8s_param *driver_data = (hfc4s8s_param *) ent->driver_data; |
1591 | hfc4s8s_hw *hw; | 1592 | hfc4s8s_hw *hw; |
1592 | 1593 | ||
1593 | if (!(hw = kmalloc(sizeof(hfc4s8s_hw), GFP_ATOMIC))) { | 1594 | if (!(hw = kzalloc(sizeof(hfc4s8s_hw), GFP_ATOMIC))) { |
1594 | printk(KERN_ERR "No kmem for HFC-4S/8S card\n"); | 1595 | printk(KERN_ERR "No kmem for HFC-4S/8S card\n"); |
1595 | return (err); | 1596 | return (err); |
1596 | } | 1597 | } |
1597 | memset(hw, 0, sizeof(hfc4s8s_hw)); | ||
1598 | 1598 | ||
1599 | hw->pdev = pdev; | 1599 | hw->pdev = pdev; |
1600 | err = pci_enable_device(pdev); | 1600 | err = pci_enable_device(pdev); |
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.h b/drivers/isdn/hisax/hfc4s8s_l1.h index e8f9c077fa85..9d5d2a56b4e9 100644 --- a/drivers/isdn/hisax/hfc4s8s_l1.h +++ b/drivers/isdn/hisax/hfc4s8s_l1.h | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | /* | 17 | /* |
18 | * include Genero generated HFC-4S/8S header file hfc48scu.h | 18 | * include Genero generated HFC-4S/8S header file hfc48scu.h |
19 | * for comlete register description. This will define _HFC48SCU_H_ | 19 | * for complete register description. This will define _HFC48SCU_H_ |
20 | * to prevent redefinitions | 20 | * to prevent redefinitions |
21 | */ | 21 | */ |
22 | 22 | ||
diff --git a/drivers/isdn/hisax/hfc_2bds0.c b/drivers/isdn/hisax/hfc_2bds0.c index 6360e8214720..8d9864453a23 100644 --- a/drivers/isdn/hisax/hfc_2bds0.c +++ b/drivers/isdn/hisax/hfc_2bds0.c | |||
@@ -549,10 +549,11 @@ setstack_2b(struct PStack *st, struct BCState *bcs) | |||
549 | } | 549 | } |
550 | 550 | ||
551 | static void | 551 | static void |
552 | hfcd_bh(struct IsdnCardState *cs) | 552 | hfcd_bh(struct work_struct *work) |
553 | { | 553 | { |
554 | if (!cs) | 554 | struct IsdnCardState *cs = |
555 | return; | 555 | container_of(work, struct IsdnCardState, tqueue); |
556 | |||
556 | if (test_and_clear_bit(D_L1STATECHANGE, &cs->event)) { | 557 | if (test_and_clear_bit(D_L1STATECHANGE, &cs->event)) { |
557 | switch (cs->dc.hfcd.ph_state) { | 558 | switch (cs->dc.hfcd.ph_state) { |
558 | case (0): | 559 | case (0): |
@@ -1072,5 +1073,5 @@ set_cs_func(struct IsdnCardState *cs) | |||
1072 | cs->dbusytimer.function = (void *) hfc_dbusy_timer; | 1073 | cs->dbusytimer.function = (void *) hfc_dbusy_timer; |
1073 | cs->dbusytimer.data = (long) cs; | 1074 | cs->dbusytimer.data = (long) cs; |
1074 | init_timer(&cs->dbusytimer); | 1075 | init_timer(&cs->dbusytimer); |
1075 | INIT_WORK(&cs->tqueue, (void *)(void *) hfcd_bh, cs); | 1076 | INIT_WORK(&cs->tqueue, hfcd_bh); |
1076 | } | 1077 | } |
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index 93f60b563515..8a48a3ce0a55 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c | |||
@@ -1211,7 +1211,7 @@ HFCPCI_l1hw(struct PStack *st, int pr, void *arg) | |||
1211 | break; | 1211 | break; |
1212 | case (HW_TESTLOOP | REQUEST): | 1212 | case (HW_TESTLOOP | REQUEST): |
1213 | spin_lock_irqsave(&cs->lock, flags); | 1213 | spin_lock_irqsave(&cs->lock, flags); |
1214 | switch ((int) arg) { | 1214 | switch ((long) arg) { |
1215 | case (1): | 1215 | case (1): |
1216 | Write_hfc(cs, HFCPCI_B1_SSL, 0x80); /* tx slot */ | 1216 | Write_hfc(cs, HFCPCI_B1_SSL, 0x80); /* tx slot */ |
1217 | Write_hfc(cs, HFCPCI_B1_RSL, 0x80); /* rx slot */ | 1217 | Write_hfc(cs, HFCPCI_B1_RSL, 0x80); /* rx slot */ |
@@ -1229,7 +1229,7 @@ HFCPCI_l1hw(struct PStack *st, int pr, void *arg) | |||
1229 | default: | 1229 | default: |
1230 | spin_unlock_irqrestore(&cs->lock, flags); | 1230 | spin_unlock_irqrestore(&cs->lock, flags); |
1231 | if (cs->debug & L1_DEB_WARN) | 1231 | if (cs->debug & L1_DEB_WARN) |
1232 | debugl1(cs, "hfcpci_l1hw loop invalid %4x", (int) arg); | 1232 | debugl1(cs, "hfcpci_l1hw loop invalid %4lx", (long) arg); |
1233 | return; | 1233 | return; |
1234 | } | 1234 | } |
1235 | cs->hw.hfcpci.trm |= 0x80; /* enable IOM-loop */ | 1235 | cs->hw.hfcpci.trm |= 0x80; /* enable IOM-loop */ |
@@ -1506,8 +1506,10 @@ setstack_2b(struct PStack *st, struct BCState *bcs) | |||
1506 | /* handle L1 state changes */ | 1506 | /* handle L1 state changes */ |
1507 | /***************************/ | 1507 | /***************************/ |
1508 | static void | 1508 | static void |
1509 | hfcpci_bh(struct IsdnCardState *cs) | 1509 | hfcpci_bh(struct work_struct *work) |
1510 | { | 1510 | { |
1511 | struct IsdnCardState *cs = | ||
1512 | container_of(work, struct IsdnCardState, tqueue); | ||
1511 | u_long flags; | 1513 | u_long flags; |
1512 | // struct PStack *stptr; | 1514 | // struct PStack *stptr; |
1513 | 1515 | ||
@@ -1709,9 +1711,9 @@ setup_hfcpci(struct IsdnCard *card) | |||
1709 | pci_write_config_dword(cs->hw.hfcpci.dev, 0x80, (u_int) virt_to_bus(cs->hw.hfcpci.fifos)); | 1711 | pci_write_config_dword(cs->hw.hfcpci.dev, 0x80, (u_int) virt_to_bus(cs->hw.hfcpci.fifos)); |
1710 | cs->hw.hfcpci.pci_io = ioremap((ulong) cs->hw.hfcpci.pci_io, 256); | 1712 | cs->hw.hfcpci.pci_io = ioremap((ulong) cs->hw.hfcpci.pci_io, 256); |
1711 | printk(KERN_INFO | 1713 | printk(KERN_INFO |
1712 | "HFC-PCI: defined at mem %#x fifo %#x(%#x) IRQ %d HZ %d\n", | 1714 | "HFC-PCI: defined at mem %p fifo %p(%#x) IRQ %d HZ %d\n", |
1713 | (u_int) cs->hw.hfcpci.pci_io, | 1715 | cs->hw.hfcpci.pci_io, |
1714 | (u_int) cs->hw.hfcpci.fifos, | 1716 | cs->hw.hfcpci.fifos, |
1715 | (u_int) virt_to_bus(cs->hw.hfcpci.fifos), | 1717 | (u_int) virt_to_bus(cs->hw.hfcpci.fifos), |
1716 | cs->irq, HZ); | 1718 | cs->irq, HZ); |
1717 | spin_lock_irqsave(&cs->lock, flags); | 1719 | spin_lock_irqsave(&cs->lock, flags); |
@@ -1722,7 +1724,7 @@ setup_hfcpci(struct IsdnCard *card) | |||
1722 | Write_hfc(cs, HFCPCI_INT_M2, cs->hw.hfcpci.int_m2); | 1724 | Write_hfc(cs, HFCPCI_INT_M2, cs->hw.hfcpci.int_m2); |
1723 | /* At this point the needed PCI config is done */ | 1725 | /* At this point the needed PCI config is done */ |
1724 | /* fifos are still not enabled */ | 1726 | /* fifos are still not enabled */ |
1725 | INIT_WORK(&cs->tqueue, (void *)(void *) hfcpci_bh, cs); | 1727 | INIT_WORK(&cs->tqueue, hfcpci_bh); |
1726 | cs->setstack_d = setstack_hfcpci; | 1728 | cs->setstack_d = setstack_hfcpci; |
1727 | cs->BC_Send_Data = &hfcpci_send_data; | 1729 | cs->BC_Send_Data = &hfcpci_send_data; |
1728 | cs->readisac = NULL; | 1730 | cs->readisac = NULL; |
diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c index 954d1536db1f..4fd09d21a27f 100644 --- a/drivers/isdn/hisax/hfc_sx.c +++ b/drivers/isdn/hisax/hfc_sx.c | |||
@@ -1251,8 +1251,10 @@ setstack_2b(struct PStack *st, struct BCState *bcs) | |||
1251 | /* handle L1 state changes */ | 1251 | /* handle L1 state changes */ |
1252 | /***************************/ | 1252 | /***************************/ |
1253 | static void | 1253 | static void |
1254 | hfcsx_bh(struct IsdnCardState *cs) | 1254 | hfcsx_bh(struct work_struct *work) |
1255 | { | 1255 | { |
1256 | struct IsdnCardState *cs = | ||
1257 | container_of(work, struct IsdnCardState, tqueue); | ||
1256 | u_long flags; | 1258 | u_long flags; |
1257 | 1259 | ||
1258 | if (!cs) | 1260 | if (!cs) |
@@ -1499,7 +1501,7 @@ setup_hfcsx(struct IsdnCard *card) | |||
1499 | cs->dbusytimer.function = (void *) hfcsx_dbusy_timer; | 1501 | cs->dbusytimer.function = (void *) hfcsx_dbusy_timer; |
1500 | cs->dbusytimer.data = (long) cs; | 1502 | cs->dbusytimer.data = (long) cs; |
1501 | init_timer(&cs->dbusytimer); | 1503 | init_timer(&cs->dbusytimer); |
1502 | INIT_WORK(&cs->tqueue, (void *)(void *) hfcsx_bh, cs); | 1504 | INIT_WORK(&cs->tqueue, hfcsx_bh); |
1503 | cs->readisac = NULL; | 1505 | cs->readisac = NULL; |
1504 | cs->writeisac = NULL; | 1506 | cs->writeisac = NULL; |
1505 | cs->readisacfifo = NULL; | 1507 | cs->readisacfifo = NULL; |
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c index 7105b043add8..5a6989f23fcf 100644 --- a/drivers/isdn/hisax/hfc_usb.c +++ b/drivers/isdn/hisax/hfc_usb.c | |||
@@ -1481,9 +1481,8 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1481 | iface = iface_used; | 1481 | iface = iface_used; |
1482 | if (! | 1482 | if (! |
1483 | (context = | 1483 | (context = |
1484 | kmalloc(sizeof(hfcusb_data), GFP_KERNEL))) | 1484 | kzalloc(sizeof(hfcusb_data), GFP_KERNEL))) |
1485 | return (-ENOMEM); /* got no mem */ | 1485 | return (-ENOMEM); /* got no mem */ |
1486 | memset(context, 0, sizeof(hfcusb_data)); | ||
1487 | 1486 | ||
1488 | ep = iface->endpoint; | 1487 | ep = iface->endpoint; |
1489 | vcf = validconf[small_match]; | 1488 | vcf = validconf[small_match]; |
diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h index 159c5896061e..3f1137e34678 100644 --- a/drivers/isdn/hisax/hisax.h +++ b/drivers/isdn/hisax/hisax.h | |||
@@ -1139,12 +1139,6 @@ struct IsdnCardState { | |||
1139 | #define CARD_HFC_SX 0 | 1139 | #define CARD_HFC_SX 0 |
1140 | #endif | 1140 | #endif |
1141 | 1141 | ||
1142 | #ifdef CONFIG_HISAX_AMD7930 | ||
1143 | #define CARD_AMD7930 1 | ||
1144 | #else | ||
1145 | #define CARD_AMD7930 0 | ||
1146 | #endif | ||
1147 | |||
1148 | #ifdef CONFIG_HISAX_NICCY | 1142 | #ifdef CONFIG_HISAX_NICCY |
1149 | #define CARD_NICCY 1 | 1143 | #define CARD_NICCY 1 |
1150 | #ifndef ISDN_CHIP_ISAC | 1144 | #ifndef ISDN_CHIP_ISAC |
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c index f6db55a752c4..9e088fce8c3a 100644 --- a/drivers/isdn/hisax/hisax_fcpcipnp.c +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c | |||
@@ -841,12 +841,10 @@ new_adapter(void) | |||
841 | struct hisax_b_if *b_if[2]; | 841 | struct hisax_b_if *b_if[2]; |
842 | int i; | 842 | int i; |
843 | 843 | ||
844 | adapter = kmalloc(sizeof(struct fritz_adapter), GFP_KERNEL); | 844 | adapter = kzalloc(sizeof(struct fritz_adapter), GFP_KERNEL); |
845 | if (!adapter) | 845 | if (!adapter) |
846 | return NULL; | 846 | return NULL; |
847 | 847 | ||
848 | memset(adapter, 0, sizeof(struct fritz_adapter)); | ||
849 | |||
850 | adapter->isac.hisax_d_if.owner = THIS_MODULE; | 848 | adapter->isac.hisax_d_if.owner = THIS_MODULE; |
851 | adapter->isac.hisax_d_if.ifc.priv = &adapter->isac; | 849 | adapter->isac.hisax_d_if.ifc.priv = &adapter->isac; |
852 | adapter->isac.hisax_d_if.ifc.l2l1 = isac_d_l2l1; | 850 | adapter->isac.hisax_d_if.ifc.l2l1 = isac_d_l2l1; |
diff --git a/drivers/isdn/hisax/hisax_isac.c b/drivers/isdn/hisax/hisax_isac.c index 81eac344bb03..d0fefcf999cb 100644 --- a/drivers/isdn/hisax/hisax_isac.c +++ b/drivers/isdn/hisax/hisax_isac.c | |||
@@ -433,7 +433,7 @@ static void l1m_debug(struct FsmInst *fi, char *fmt, ...) | |||
433 | char buf[256]; | 433 | char buf[256]; |
434 | 434 | ||
435 | va_start(args, fmt); | 435 | va_start(args, fmt); |
436 | vsprintf(buf, fmt, args); | 436 | vsnprintf(buf, sizeof(buf), fmt, args); |
437 | DBG(DBG_L1M, "%s", buf); | 437 | DBG(DBG_L1M, "%s", buf); |
438 | va_end(args); | 438 | va_end(args); |
439 | } | 439 | } |
diff --git a/drivers/isdn/hisax/icc.c b/drivers/isdn/hisax/icc.c index da706925d54d..682cac32f259 100644 --- a/drivers/isdn/hisax/icc.c +++ b/drivers/isdn/hisax/icc.c | |||
@@ -77,8 +77,10 @@ icc_new_ph(struct IsdnCardState *cs) | |||
77 | } | 77 | } |
78 | 78 | ||
79 | static void | 79 | static void |
80 | icc_bh(struct IsdnCardState *cs) | 80 | icc_bh(struct work_struct *work) |
81 | { | 81 | { |
82 | struct IsdnCardState *cs = | ||
83 | container_of(work, struct IsdnCardState, tqueue); | ||
82 | struct PStack *stptr; | 84 | struct PStack *stptr; |
83 | 85 | ||
84 | if (!cs) | 86 | if (!cs) |
@@ -674,7 +676,7 @@ clear_pending_icc_ints(struct IsdnCardState *cs) | |||
674 | void __devinit | 676 | void __devinit |
675 | setup_icc(struct IsdnCardState *cs) | 677 | setup_icc(struct IsdnCardState *cs) |
676 | { | 678 | { |
677 | INIT_WORK(&cs->tqueue, (void *)(void *) icc_bh, cs); | 679 | INIT_WORK(&cs->tqueue, icc_bh); |
678 | cs->dbusytimer.function = (void *) dbusy_timer_handler; | 680 | cs->dbusytimer.function = (void *) dbusy_timer_handler; |
679 | cs->dbusytimer.data = (long) cs; | 681 | cs->dbusytimer.data = (long) cs; |
680 | init_timer(&cs->dbusytimer); | 682 | init_timer(&cs->dbusytimer); |
diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c index 282f349408bc..4e9f23803dae 100644 --- a/drivers/isdn/hisax/isac.c +++ b/drivers/isdn/hisax/isac.c | |||
@@ -81,8 +81,10 @@ isac_new_ph(struct IsdnCardState *cs) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | static void | 83 | static void |
84 | isac_bh(struct IsdnCardState *cs) | 84 | isac_bh(struct work_struct *work) |
85 | { | 85 | { |
86 | struct IsdnCardState *cs = | ||
87 | container_of(work, struct IsdnCardState, tqueue); | ||
86 | struct PStack *stptr; | 88 | struct PStack *stptr; |
87 | 89 | ||
88 | if (!cs) | 90 | if (!cs) |
@@ -674,7 +676,7 @@ clear_pending_isac_ints(struct IsdnCardState *cs) | |||
674 | void __devinit | 676 | void __devinit |
675 | setup_isac(struct IsdnCardState *cs) | 677 | setup_isac(struct IsdnCardState *cs) |
676 | { | 678 | { |
677 | INIT_WORK(&cs->tqueue, (void *)(void *) isac_bh, cs); | 679 | INIT_WORK(&cs->tqueue, isac_bh); |
678 | cs->dbusytimer.function = (void *) dbusy_timer_handler; | 680 | cs->dbusytimer.function = (void *) dbusy_timer_handler; |
679 | cs->dbusytimer.data = (long) cs; | 681 | cs->dbusytimer.data = (long) cs; |
680 | init_timer(&cs->dbusytimer); | 682 | init_timer(&cs->dbusytimer); |
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c index 674af673ff96..6f1a6583b17d 100644 --- a/drivers/isdn/hisax/isar.c +++ b/drivers/isdn/hisax/isar.c | |||
@@ -437,8 +437,10 @@ extern void BChannel_bh(struct BCState *); | |||
437 | #define B_LL_OK 10 | 437 | #define B_LL_OK 10 |
438 | 438 | ||
439 | static void | 439 | static void |
440 | isar_bh(struct BCState *bcs) | 440 | isar_bh(struct work_struct *work) |
441 | { | 441 | { |
442 | struct BCState *bcs = container_of(work, struct BCState, tqueue); | ||
443 | |||
442 | BChannel_bh(bcs); | 444 | BChannel_bh(bcs); |
443 | if (test_and_clear_bit(B_LL_NOCARRIER, &bcs->event)) | 445 | if (test_and_clear_bit(B_LL_NOCARRIER, &bcs->event)) |
444 | ll_deliver_faxstat(bcs, ISDN_FAX_CLASS1_NOCARR); | 446 | ll_deliver_faxstat(bcs, ISDN_FAX_CLASS1_NOCARR); |
@@ -1580,7 +1582,7 @@ isar_setup(struct IsdnCardState *cs) | |||
1580 | cs->bcs[i].mode = 0; | 1582 | cs->bcs[i].mode = 0; |
1581 | cs->bcs[i].hw.isar.dpath = i + 1; | 1583 | cs->bcs[i].hw.isar.dpath = i + 1; |
1582 | modeisar(&cs->bcs[i], 0, 0); | 1584 | modeisar(&cs->bcs[i], 0, 0); |
1583 | INIT_WORK(&cs->bcs[i].tqueue, (void *)(void *) isar_bh, &cs->bcs[i]); | 1585 | INIT_WORK(&cs->bcs[i].tqueue, isar_bh); |
1584 | } | 1586 | } |
1585 | } | 1587 | } |
1586 | 1588 | ||
diff --git a/drivers/isdn/hisax/isdnhdlc.c b/drivers/isdn/hisax/isdnhdlc.c index cbdf54c5af84..268dced6c34a 100644 --- a/drivers/isdn/hisax/isdnhdlc.c +++ b/drivers/isdn/hisax/isdnhdlc.c | |||
@@ -35,30 +35,6 @@ MODULE_LICENSE("GPL"); | |||
35 | 35 | ||
36 | /*-------------------------------------------------------------------*/ | 36 | /*-------------------------------------------------------------------*/ |
37 | 37 | ||
38 | /* bit swap table. | ||
39 | * Very handy for devices with different bit order, | ||
40 | * and neccessary for each transparent B-channel access for all | ||
41 | * devices which works with this HDLC decoder without bit reversal. | ||
42 | */ | ||
43 | const unsigned char isdnhdlc_bit_rev_tab[256] = { | ||
44 | 0x00,0x80,0x40,0xC0,0x20,0xA0,0x60,0xE0,0x10,0x90,0x50,0xD0,0x30,0xB0,0x70,0xF0, | ||
45 | 0x08,0x88,0x48,0xC8,0x28,0xA8,0x68,0xE8,0x18,0x98,0x58,0xD8,0x38,0xB8,0x78,0xF8, | ||
46 | 0x04,0x84,0x44,0xC4,0x24,0xA4,0x64,0xE4,0x14,0x94,0x54,0xD4,0x34,0xB4,0x74,0xF4, | ||
47 | 0x0C,0x8C,0x4C,0xCC,0x2C,0xAC,0x6C,0xEC,0x1C,0x9C,0x5C,0xDC,0x3C,0xBC,0x7C,0xFC, | ||
48 | 0x02,0x82,0x42,0xC2,0x22,0xA2,0x62,0xE2,0x12,0x92,0x52,0xD2,0x32,0xB2,0x72,0xF2, | ||
49 | 0x0A,0x8A,0x4A,0xCA,0x2A,0xAA,0x6A,0xEA,0x1A,0x9A,0x5A,0xDA,0x3A,0xBA,0x7A,0xFA, | ||
50 | 0x06,0x86,0x46,0xC6,0x26,0xA6,0x66,0xE6,0x16,0x96,0x56,0xD6,0x36,0xB6,0x76,0xF6, | ||
51 | 0x0E,0x8E,0x4E,0xCE,0x2E,0xAE,0x6E,0xEE,0x1E,0x9E,0x5E,0xDE,0x3E,0xBE,0x7E,0xFE, | ||
52 | 0x01,0x81,0x41,0xC1,0x21,0xA1,0x61,0xE1,0x11,0x91,0x51,0xD1,0x31,0xB1,0x71,0xF1, | ||
53 | 0x09,0x89,0x49,0xC9,0x29,0xA9,0x69,0xE9,0x19,0x99,0x59,0xD9,0x39,0xB9,0x79,0xF9, | ||
54 | 0x05,0x85,0x45,0xC5,0x25,0xA5,0x65,0xE5,0x15,0x95,0x55,0xD5,0x35,0xB5,0x75,0xF5, | ||
55 | 0x0D,0x8D,0x4D,0xCD,0x2D,0xAD,0x6D,0xED,0x1D,0x9D,0x5D,0xDD,0x3D,0xBD,0x7D,0xFD, | ||
56 | 0x03,0x83,0x43,0xC3,0x23,0xA3,0x63,0xE3,0x13,0x93,0x53,0xD3,0x33,0xB3,0x73,0xF3, | ||
57 | 0x0B,0x8B,0x4B,0xCB,0x2B,0xAB,0x6B,0xEB,0x1B,0x9B,0x5B,0xDB,0x3B,0xBB,0x7B,0xFB, | ||
58 | 0x07,0x87,0x47,0xC7,0x27,0xA7,0x67,0xE7,0x17,0x97,0x57,0xD7,0x37,0xB7,0x77,0xF7, | ||
59 | 0x0F,0x8F,0x4F,0xCF,0x2F,0xAF,0x6F,0xEF,0x1F,0x9F,0x5F,0xDF,0x3F,0xBF,0x7F,0xFF | ||
60 | }; | ||
61 | |||
62 | enum { | 38 | enum { |
63 | HDLC_FAST_IDLE,HDLC_GET_FLAG_B0,HDLC_GETFLAG_B1A6,HDLC_GETFLAG_B7, | 39 | HDLC_FAST_IDLE,HDLC_GET_FLAG_B0,HDLC_GETFLAG_B1A6,HDLC_GETFLAG_B7, |
64 | HDLC_GET_DATA,HDLC_FAST_FLAG | 40 | HDLC_GET_DATA,HDLC_FAST_FLAG |
@@ -621,7 +597,6 @@ int isdnhdlc_encode(struct isdnhdlc_vars *hdlc, const unsigned char *src, | |||
621 | return len; | 597 | return len; |
622 | } | 598 | } |
623 | 599 | ||
624 | EXPORT_SYMBOL(isdnhdlc_bit_rev_tab); | ||
625 | EXPORT_SYMBOL(isdnhdlc_rcv_init); | 600 | EXPORT_SYMBOL(isdnhdlc_rcv_init); |
626 | EXPORT_SYMBOL(isdnhdlc_decode); | 601 | EXPORT_SYMBOL(isdnhdlc_decode); |
627 | EXPORT_SYMBOL(isdnhdlc_out_init); | 602 | EXPORT_SYMBOL(isdnhdlc_out_init); |
diff --git a/drivers/isdn/hisax/isdnhdlc.h b/drivers/isdn/hisax/isdnhdlc.h index 269315988dc8..45167d2f8fb0 100644 --- a/drivers/isdn/hisax/isdnhdlc.h +++ b/drivers/isdn/hisax/isdnhdlc.h | |||
@@ -41,10 +41,10 @@ struct isdnhdlc_vars { | |||
41 | unsigned char shift_reg; | 41 | unsigned char shift_reg; |
42 | unsigned char ffvalue; | 42 | unsigned char ffvalue; |
43 | 43 | ||
44 | int data_received:1; // set if transferring data | 44 | unsigned int data_received:1; // set if transferring data |
45 | int dchannel:1; // set if D channel (send idle instead of flags) | 45 | unsigned int dchannel:1; // set if D channel (send idle instead of flags) |
46 | int do_adapt56:1; // set if 56K adaptation | 46 | unsigned int do_adapt56:1; // set if 56K adaptation |
47 | int do_closing:1; // set if in closing phase (need to send CRC + flag | 47 | unsigned int do_closing:1; // set if in closing phase (need to send CRC + flag |
48 | }; | 48 | }; |
49 | 49 | ||
50 | 50 | ||
@@ -57,8 +57,6 @@ struct isdnhdlc_vars { | |||
57 | #define HDLC_CRC_ERROR 2 | 57 | #define HDLC_CRC_ERROR 2 |
58 | #define HDLC_LENGTH_ERROR 3 | 58 | #define HDLC_LENGTH_ERROR 3 |
59 | 59 | ||
60 | extern const unsigned char isdnhdlc_bit_rev_tab[256]; | ||
61 | |||
62 | extern void isdnhdlc_rcv_init (struct isdnhdlc_vars *hdlc, int do_adapt56); | 60 | extern void isdnhdlc_rcv_init (struct isdnhdlc_vars *hdlc, int do_adapt56); |
63 | 61 | ||
64 | extern int isdnhdlc_decode (struct isdnhdlc_vars *hdlc, const unsigned char *src, int slen,int *count, | 62 | extern int isdnhdlc_decode (struct isdnhdlc_vars *hdlc, const unsigned char *src, int slen,int *count, |
diff --git a/drivers/isdn/hisax/isdnl1.c b/drivers/isdn/hisax/isdnl1.c index bab356886483..a14204ec88ee 100644 --- a/drivers/isdn/hisax/isdnl1.c +++ b/drivers/isdn/hisax/isdnl1.c | |||
@@ -315,8 +315,10 @@ BChannel_proc_ack(struct BCState *bcs) | |||
315 | } | 315 | } |
316 | 316 | ||
317 | void | 317 | void |
318 | BChannel_bh(struct BCState *bcs) | 318 | BChannel_bh(struct work_struct *work) |
319 | { | 319 | { |
320 | struct BCState *bcs = container_of(work, struct BCState, tqueue); | ||
321 | |||
320 | if (!bcs) | 322 | if (!bcs) |
321 | return; | 323 | return; |
322 | if (test_and_clear_bit(B_RCVBUFREADY, &bcs->event)) | 324 | if (test_and_clear_bit(B_RCVBUFREADY, &bcs->event)) |
@@ -362,7 +364,7 @@ init_bcstate(struct IsdnCardState *cs, int bc) | |||
362 | 364 | ||
363 | bcs->cs = cs; | 365 | bcs->cs = cs; |
364 | bcs->channel = bc; | 366 | bcs->channel = bc; |
365 | INIT_WORK(&bcs->tqueue, (void *)(void *) BChannel_bh, bcs); | 367 | INIT_WORK(&bcs->tqueue, BChannel_bh); |
366 | spin_lock_init(&bcs->aclock); | 368 | spin_lock_init(&bcs->aclock); |
367 | bcs->BC_SetStack = NULL; | 369 | bcs->BC_SetStack = NULL; |
368 | bcs->BC_Close = NULL; | 370 | bcs->BC_Close = NULL; |
diff --git a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c index 6d0431725555..cd3b5ad53491 100644 --- a/drivers/isdn/hisax/isdnl2.c +++ b/drivers/isdn/hisax/isdnl2.c | |||
@@ -1442,7 +1442,7 @@ l2_tei_remove(struct FsmInst *fi, int event, void *arg) | |||
1442 | } | 1442 | } |
1443 | 1443 | ||
1444 | static void | 1444 | static void |
1445 | l2_st14_persistant_da(struct FsmInst *fi, int event, void *arg) | 1445 | l2_st14_persistent_da(struct FsmInst *fi, int event, void *arg) |
1446 | { | 1446 | { |
1447 | struct PStack *st = fi->userdata; | 1447 | struct PStack *st = fi->userdata; |
1448 | 1448 | ||
@@ -1453,7 +1453,7 @@ l2_st14_persistant_da(struct FsmInst *fi, int event, void *arg) | |||
1453 | } | 1453 | } |
1454 | 1454 | ||
1455 | static void | 1455 | static void |
1456 | l2_st5_persistant_da(struct FsmInst *fi, int event, void *arg) | 1456 | l2_st5_persistent_da(struct FsmInst *fi, int event, void *arg) |
1457 | { | 1457 | { |
1458 | struct PStack *st = fi->userdata; | 1458 | struct PStack *st = fi->userdata; |
1459 | 1459 | ||
@@ -1466,7 +1466,7 @@ l2_st5_persistant_da(struct FsmInst *fi, int event, void *arg) | |||
1466 | } | 1466 | } |
1467 | 1467 | ||
1468 | static void | 1468 | static void |
1469 | l2_st6_persistant_da(struct FsmInst *fi, int event, void *arg) | 1469 | l2_st6_persistent_da(struct FsmInst *fi, int event, void *arg) |
1470 | { | 1470 | { |
1471 | struct PStack *st = fi->userdata; | 1471 | struct PStack *st = fi->userdata; |
1472 | 1472 | ||
@@ -1477,7 +1477,7 @@ l2_st6_persistant_da(struct FsmInst *fi, int event, void *arg) | |||
1477 | } | 1477 | } |
1478 | 1478 | ||
1479 | static void | 1479 | static void |
1480 | l2_persistant_da(struct FsmInst *fi, int event, void *arg) | 1480 | l2_persistent_da(struct FsmInst *fi, int event, void *arg) |
1481 | { | 1481 | { |
1482 | struct PStack *st = fi->userdata; | 1482 | struct PStack *st = fi->userdata; |
1483 | 1483 | ||
@@ -1612,14 +1612,14 @@ static struct FsmNode L2FnList[] __initdata = | |||
1612 | {ST_L2_6, EV_L2_FRAME_ERROR, l2_frame_error}, | 1612 | {ST_L2_6, EV_L2_FRAME_ERROR, l2_frame_error}, |
1613 | {ST_L2_7, EV_L2_FRAME_ERROR, l2_frame_error_reest}, | 1613 | {ST_L2_7, EV_L2_FRAME_ERROR, l2_frame_error_reest}, |
1614 | {ST_L2_8, EV_L2_FRAME_ERROR, l2_frame_error_reest}, | 1614 | {ST_L2_8, EV_L2_FRAME_ERROR, l2_frame_error_reest}, |
1615 | {ST_L2_1, EV_L1_DEACTIVATE, l2_st14_persistant_da}, | 1615 | {ST_L2_1, EV_L1_DEACTIVATE, l2_st14_persistent_da}, |
1616 | {ST_L2_2, EV_L1_DEACTIVATE, l2_st24_tei_remove}, | 1616 | {ST_L2_2, EV_L1_DEACTIVATE, l2_st24_tei_remove}, |
1617 | {ST_L2_3, EV_L1_DEACTIVATE, l2_st3_tei_remove}, | 1617 | {ST_L2_3, EV_L1_DEACTIVATE, l2_st3_tei_remove}, |
1618 | {ST_L2_4, EV_L1_DEACTIVATE, l2_st14_persistant_da}, | 1618 | {ST_L2_4, EV_L1_DEACTIVATE, l2_st14_persistent_da}, |
1619 | {ST_L2_5, EV_L1_DEACTIVATE, l2_st5_persistant_da}, | 1619 | {ST_L2_5, EV_L1_DEACTIVATE, l2_st5_persistent_da}, |
1620 | {ST_L2_6, EV_L1_DEACTIVATE, l2_st6_persistant_da}, | 1620 | {ST_L2_6, EV_L1_DEACTIVATE, l2_st6_persistent_da}, |
1621 | {ST_L2_7, EV_L1_DEACTIVATE, l2_persistant_da}, | 1621 | {ST_L2_7, EV_L1_DEACTIVATE, l2_persistent_da}, |
1622 | {ST_L2_8, EV_L1_DEACTIVATE, l2_persistant_da}, | 1622 | {ST_L2_8, EV_L1_DEACTIVATE, l2_persistent_da}, |
1623 | }; | 1623 | }; |
1624 | 1624 | ||
1625 | #define L2_FN_COUNT (sizeof(L2FnList)/sizeof(struct FsmNode)) | 1625 | #define L2_FN_COUNT (sizeof(L2FnList)/sizeof(struct FsmNode)) |
diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c index 9522141f4351..030d1625c5c6 100644 --- a/drivers/isdn/hisax/sedlbauer.c +++ b/drivers/isdn/hisax/sedlbauer.c | |||
@@ -677,7 +677,11 @@ setup_sedlbauer(struct IsdnCard *card) | |||
677 | return (0); | 677 | return (0); |
678 | #endif /* CONFIG_PCI */ | 678 | #endif /* CONFIG_PCI */ |
679 | } | 679 | } |
680 | |||
681 | #ifdef __ISAPNP__ | ||
680 | ready: | 682 | ready: |
683 | #endif | ||
684 | |||
681 | /* In case of the sedlbauer pcmcia card, this region is in use, | 685 | /* In case of the sedlbauer pcmcia card, this region is in use, |
682 | * reserved for us by the card manager. So we do not check it | 686 | * reserved for us by the card manager. So we do not check it |
683 | * here, it would fail. | 687 | * here, it would fail. |
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c index f9c14a2970bc..45debde05fbd 100644 --- a/drivers/isdn/hisax/sedlbauer_cs.c +++ b/drivers/isdn/hisax/sedlbauer_cs.c | |||
@@ -155,9 +155,8 @@ static int sedlbauer_probe(struct pcmcia_device *link) | |||
155 | DEBUG(0, "sedlbauer_attach()\n"); | 155 | DEBUG(0, "sedlbauer_attach()\n"); |
156 | 156 | ||
157 | /* Allocate space for private device-specific data */ | 157 | /* Allocate space for private device-specific data */ |
158 | local = kmalloc(sizeof(local_info_t), GFP_KERNEL); | 158 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); |
159 | if (!local) return -ENOMEM; | 159 | if (!local) return -ENOMEM; |
160 | memset(local, 0, sizeof(local_info_t)); | ||
161 | local->cardnr = -1; | 160 | local->cardnr = -1; |
162 | 161 | ||
163 | local->p_dev = link; | 162 | local->p_dev = link; |
@@ -233,20 +232,10 @@ static int sedlbauer_config(struct pcmcia_device *link) | |||
233 | 232 | ||
234 | DEBUG(0, "sedlbauer_config(0x%p)\n", link); | 233 | DEBUG(0, "sedlbauer_config(0x%p)\n", link); |
235 | 234 | ||
236 | /* | ||
237 | This reads the card's CONFIG tuple to find its configuration | ||
238 | registers. | ||
239 | */ | ||
240 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
241 | tuple.Attributes = 0; | 235 | tuple.Attributes = 0; |
242 | tuple.TupleData = buf; | 236 | tuple.TupleData = buf; |
243 | tuple.TupleDataMax = sizeof(buf); | 237 | tuple.TupleDataMax = sizeof(buf); |
244 | tuple.TupleOffset = 0; | 238 | tuple.TupleOffset = 0; |
245 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | ||
246 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
247 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | ||
248 | link->conf.ConfigBase = parse.config.base; | ||
249 | link->conf.Present = parse.config.rmask[0]; | ||
250 | 239 | ||
251 | CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(link, &conf)); | 240 | CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(link, &conf)); |
252 | 241 | ||
diff --git a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c index 75d0f248e4ee..fa64115cd7c7 100644 --- a/drivers/isdn/hisax/st5481_b.c +++ b/drivers/isdn/hisax/st5481_b.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/usb.h> | 14 | #include <linux/usb.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
17 | #include <linux/bitrev.h> | ||
17 | #include "st5481.h" | 18 | #include "st5481.h" |
18 | 19 | ||
19 | static inline void B_L1L2(struct st5481_bcs *bcs, int pr, void *arg) | 20 | static inline void B_L1L2(struct st5481_bcs *bcs, int pr, void *arg) |
@@ -72,7 +73,7 @@ static void usb_b_out(struct st5481_bcs *bcs,int buf_nr) | |||
72 | register unsigned char *dest = urb->transfer_buffer+len; | 73 | register unsigned char *dest = urb->transfer_buffer+len; |
73 | register unsigned int count; | 74 | register unsigned int count; |
74 | for (count = 0; count < bytes_sent; count++) | 75 | for (count = 0; count < bytes_sent; count++) |
75 | *dest++ = isdnhdlc_bit_rev_tab[*src++]; | 76 | *dest++ = bitrev8(*src++); |
76 | } | 77 | } |
77 | len += bytes_sent; | 78 | len += bytes_sent; |
78 | } else { | 79 | } else { |
diff --git a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c index 1d8c2618366c..b8c4855cc889 100644 --- a/drivers/isdn/hisax/st5481_d.c +++ b/drivers/isdn/hisax/st5481_d.c | |||
@@ -173,7 +173,7 @@ static void l1m_debug(struct FsmInst *fi, char *fmt, ...) | |||
173 | char buf[256]; | 173 | char buf[256]; |
174 | 174 | ||
175 | va_start(args, fmt); | 175 | va_start(args, fmt); |
176 | vsprintf(buf, fmt, args); | 176 | vsnprintf(buf, sizeof(buf), fmt, args); |
177 | DBG(8, "%s", buf); | 177 | DBG(8, "%s", buf); |
178 | va_end(args); | 178 | va_end(args); |
179 | } | 179 | } |
@@ -275,7 +275,7 @@ static void dout_debug(struct FsmInst *fi, char *fmt, ...) | |||
275 | char buf[256]; | 275 | char buf[256]; |
276 | 276 | ||
277 | va_start(args, fmt); | 277 | va_start(args, fmt); |
278 | vsprintf(buf, fmt, args); | 278 | vsnprintf(buf, sizeof(buf), fmt, args); |
279 | DBG(0x2, "%s", buf); | 279 | DBG(0x2, "%s", buf); |
280 | va_end(args); | 280 | va_end(args); |
281 | } | 281 | } |
diff --git a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c index 2716aa5c60f7..bb3a28a53ff4 100644 --- a/drivers/isdn/hisax/st5481_init.c +++ b/drivers/isdn/hisax/st5481_init.c | |||
@@ -69,12 +69,10 @@ static int probe_st5481(struct usb_interface *intf, | |||
69 | le16_to_cpu(dev->descriptor.idProduct), | 69 | le16_to_cpu(dev->descriptor.idProduct), |
70 | number_of_leds); | 70 | number_of_leds); |
71 | 71 | ||
72 | adapter = kmalloc(sizeof(struct st5481_adapter), GFP_KERNEL); | 72 | adapter = kzalloc(sizeof(struct st5481_adapter), GFP_KERNEL); |
73 | if (!adapter) | 73 | if (!adapter) |
74 | return -ENOMEM; | 74 | return -ENOMEM; |
75 | 75 | ||
76 | memset(adapter, 0, sizeof(struct st5481_adapter)); | ||
77 | |||
78 | adapter->number_of_leds = number_of_leds; | 76 | adapter->number_of_leds = number_of_leds; |
79 | adapter->usb_dev = dev; | 77 | adapter->usb_dev = dev; |
80 | 78 | ||
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c index afcc2aeadb34..3e3e18239ec7 100644 --- a/drivers/isdn/hisax/teles_cs.c +++ b/drivers/isdn/hisax/teles_cs.c | |||
@@ -137,9 +137,8 @@ static int teles_probe(struct pcmcia_device *link) | |||
137 | DEBUG(0, "teles_attach()\n"); | 137 | DEBUG(0, "teles_attach()\n"); |
138 | 138 | ||
139 | /* Allocate space for private device-specific data */ | 139 | /* Allocate space for private device-specific data */ |
140 | local = kmalloc(sizeof(local_info_t), GFP_KERNEL); | 140 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); |
141 | if (!local) return -ENOMEM; | 141 | if (!local) return -ENOMEM; |
142 | memset(local, 0, sizeof(local_info_t)); | ||
143 | local->cardnr = -1; | 142 | local->cardnr = -1; |
144 | 143 | ||
145 | local->p_dev = link; | 144 | local->p_dev = link; |
@@ -232,23 +231,6 @@ static int teles_cs_config(struct pcmcia_device *link) | |||
232 | DEBUG(0, "teles_config(0x%p)\n", link); | 231 | DEBUG(0, "teles_config(0x%p)\n", link); |
233 | dev = link->priv; | 232 | dev = link->priv; |
234 | 233 | ||
235 | /* | ||
236 | This reads the card's CONFIG tuple to find its configuration | ||
237 | registers. | ||
238 | */ | ||
239 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
240 | tuple.TupleData = (cisdata_t *)buf; | ||
241 | tuple.TupleDataMax = 255; | ||
242 | tuple.TupleOffset = 0; | ||
243 | tuple.Attributes = 0; | ||
244 | i = first_tuple(link, &tuple, &parse); | ||
245 | if (i != CS_SUCCESS) { | ||
246 | last_fn = ParseTuple; | ||
247 | goto cs_failed; | ||
248 | } | ||
249 | link->conf.ConfigBase = parse.config.base; | ||
250 | link->conf.Present = parse.config.rmask[0]; | ||
251 | |||
252 | tuple.TupleData = (cisdata_t *)buf; | 234 | tuple.TupleData = (cisdata_t *)buf; |
253 | tuple.TupleOffset = 0; tuple.TupleDataMax = 255; | 235 | tuple.TupleOffset = 0; tuple.TupleDataMax = 255; |
254 | tuple.Attributes = 0; | 236 | tuple.Attributes = 0; |
diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c index 1655341797a9..3aeceaf9769e 100644 --- a/drivers/isdn/hisax/w6692.c +++ b/drivers/isdn/hisax/w6692.c | |||
@@ -101,8 +101,10 @@ W6692_new_ph(struct IsdnCardState *cs) | |||
101 | } | 101 | } |
102 | 102 | ||
103 | static void | 103 | static void |
104 | W6692_bh(struct IsdnCardState *cs) | 104 | W6692_bh(struct work_struct *work) |
105 | { | 105 | { |
106 | struct IsdnCardState *cs = | ||
107 | container_of(work, struct IsdnCardState, tqueue); | ||
106 | struct PStack *stptr; | 108 | struct PStack *stptr; |
107 | 109 | ||
108 | if (!cs) | 110 | if (!cs) |
@@ -1070,7 +1072,7 @@ setup_w6692(struct IsdnCard *card) | |||
1070 | id_list[cs->subtyp].card_name, cs->irq, | 1072 | id_list[cs->subtyp].card_name, cs->irq, |
1071 | cs->hw.w6692.iobase); | 1073 | cs->hw.w6692.iobase); |
1072 | 1074 | ||
1073 | INIT_WORK(&cs->tqueue, (void *)(void *) W6692_bh, cs); | 1075 | INIT_WORK(&cs->tqueue, W6692_bh); |
1074 | cs->readW6692 = &ReadW6692; | 1076 | cs->readW6692 = &ReadW6692; |
1075 | cs->writeW6692 = &WriteW6692; | 1077 | cs->writeW6692 = &WriteW6692; |
1076 | cs->readisacfifo = &ReadISACfifo; | 1078 | cs->readisacfifo = &ReadISACfifo; |