Commit 3e12a6dc authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-isdn.bkbits.net/linux-2.5.isdn

into home.transmeta.com:/home/torvalds/v2.5/linux
parents a06ae2d9 dd7728a8
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -178,8 +178,6 @@ static int __init b1isa_init(void) ...@@ -178,8 +178,6 @@ static int __init b1isa_init(void)
int i, retval; int i, retval;
int found = 0; int found = 0;
MOD_INC_USE_COUNT;
b1_set_revision(&b1isa_driver, revision); b1_set_revision(&b1isa_driver, revision);
attach_capi_driver(&b1isa_driver); attach_capi_driver(&b1isa_driver);
...@@ -203,7 +201,6 @@ static int __init b1isa_init(void) ...@@ -203,7 +201,6 @@ static int __init b1isa_init(void)
err: err:
detach_capi_driver(&b1isa_driver); detach_capi_driver(&b1isa_driver);
out: out:
MOD_DEC_USE_COUNT;
return retval; return retval;
} }
......
...@@ -397,8 +397,6 @@ static int __init b1pci_init(void) ...@@ -397,8 +397,6 @@ static int __init b1pci_init(void)
{ {
int retval; int retval;
MOD_INC_USE_COUNT;
b1_set_revision(&b1pci_driver, revision); b1_set_revision(&b1pci_driver, revision);
attach_capi_driver(&b1pci_driver); attach_capi_driver(&b1pci_driver);
...@@ -422,7 +420,6 @@ static int __init b1pci_init(void) ...@@ -422,7 +420,6 @@ static int __init b1pci_init(void)
detach_capi_driver(&b1pciv4_driver); detach_capi_driver(&b1pciv4_driver);
#endif #endif
out: out:
MOD_DEC_USE_COUNT;
return retval; return retval;
} }
......
...@@ -200,12 +200,9 @@ EXPORT_SYMBOL(b1pcmcia_delcard); ...@@ -200,12 +200,9 @@ EXPORT_SYMBOL(b1pcmcia_delcard);
static int __init b1pcmcia_init(void) static int __init b1pcmcia_init(void)
{ {
MOD_INC_USE_COUNT;
b1_set_revision(&b1pcmcia_driver, revision); b1_set_revision(&b1pcmcia_driver, revision);
attach_capi_driver(&b1pcmcia_driver); attach_capi_driver(&b1pcmcia_driver);
MOD_DEC_USE_COUNT;
return 0; return 0;
} }
......
...@@ -1282,8 +1282,6 @@ static int __init c4_init(void) ...@@ -1282,8 +1282,6 @@ static int __init c4_init(void)
{ {
int retval; int retval;
MOD_INC_USE_COUNT;
b1_set_revision(&c2_driver, revision); b1_set_revision(&c2_driver, revision);
attach_capi_driver(&c2_driver); attach_capi_driver(&c2_driver);
...@@ -1304,7 +1302,6 @@ static int __init c4_init(void) ...@@ -1304,7 +1302,6 @@ static int __init c4_init(void)
detach_capi_driver(&c2_driver); detach_capi_driver(&c2_driver);
detach_capi_driver(&c4_driver); detach_capi_driver(&c4_driver);
out: out:
MOD_DEC_USE_COUNT;
return retval; return retval;
} }
......
...@@ -345,12 +345,11 @@ static void t1isa_remove(struct pci_dev *pdev) ...@@ -345,12 +345,11 @@ static void t1isa_remove(struct pci_dev *pdev)
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
static int __init t1isa_probe(struct pci_dev *pdev) static int __init t1isa_probe(struct pci_dev *pdev, int cardnr)
{ {
avmctrl_info *cinfo; avmctrl_info *cinfo;
avmcard *card; avmcard *card;
int retval; int retval;
static int cardnr = 1;
card = b1_alloc_card(1); card = b1_alloc_card(1);
if (!card) { if (!card) {
...@@ -363,7 +362,7 @@ static int __init t1isa_probe(struct pci_dev *pdev) ...@@ -363,7 +362,7 @@ static int __init t1isa_probe(struct pci_dev *pdev)
card->port = pci_resource_start(pdev, 0); card->port = pci_resource_start(pdev, 0);
card->irq = pdev->irq; card->irq = pdev->irq;
card->cardtype = avm_t1isa; card->cardtype = avm_t1isa;
card->cardnr = cardnr++; card->cardnr = cardnr;
sprintf(card->name, "t1isa-%x", card->port); sprintf(card->name, "t1isa-%x", card->port);
if (!(((card->port & 0x7) == 0) && ((card->port & 0x30) != 0x30))) { if (!(((card->port & 0x7) == 0) && ((card->port & 0x30) != 0x30))) {
...@@ -505,19 +504,20 @@ static struct capi_driver t1isa_driver = { ...@@ -505,19 +504,20 @@ static struct capi_driver t1isa_driver = {
static struct pci_dev isa_dev[MAX_CARDS]; static struct pci_dev isa_dev[MAX_CARDS];
static int io[MAX_CARDS]; static int io[MAX_CARDS];
static int irq[MAX_CARDS]; static int irq[MAX_CARDS];
static int cardnr[MAX_CARDS];
MODULE_PARM(io, "1-" __MODULE_STRING(MAX_CARDS) "i"); MODULE_PARM(io, "1-" __MODULE_STRING(MAX_CARDS) "i");
MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_CARDS) "i"); MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_CARDS) "i");
MODULE_PARM(cardnr, "1-" __MODULE_STRING(MAX_CARDS) "i");
MODULE_PARM_DESC(io, "I/O base address(es)"); MODULE_PARM_DESC(io, "I/O base address(es)");
MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)"); MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)");
MODULE_PARM_DESC(cardnr, "Card number(s) (as jumpered)");
static int __init t1isa_init(void) static int __init t1isa_init(void)
{ {
int i, retval; int i, retval;
int found = 0; int found = 0;
MOD_INC_USE_COUNT;
b1_set_revision(&t1isa_driver, revision); b1_set_revision(&t1isa_driver, revision);
attach_capi_driver(&t1isa_driver); attach_capi_driver(&t1isa_driver);
...@@ -528,7 +528,7 @@ static int __init t1isa_init(void) ...@@ -528,7 +528,7 @@ static int __init t1isa_init(void)
isa_dev[i].resource[0].start = io[i]; isa_dev[i].resource[0].start = io[i];
isa_dev[i].irq_resource[0].start = irq[i]; isa_dev[i].irq_resource[0].start = irq[i];
if (t1isa_probe(&isa_dev[i]) == 0) if (t1isa_probe(&isa_dev[i], cardnr[i]) == 0)
found++; found++;
} }
if (found == 0) { if (found == 0) {
...@@ -541,7 +541,6 @@ static int __init t1isa_init(void) ...@@ -541,7 +541,6 @@ static int __init t1isa_init(void)
err: err:
detach_capi_driver(&t1isa_driver); detach_capi_driver(&t1isa_driver);
out: out:
MOD_DEC_USE_COUNT;
return retval; return retval;
} }
......
...@@ -239,8 +239,6 @@ static int __init t1pci_init(void) ...@@ -239,8 +239,6 @@ static int __init t1pci_init(void)
{ {
int retval; int retval;
MOD_INC_USE_COUNT;
b1_set_revision(&t1pci_driver, revision); b1_set_revision(&t1pci_driver, revision);
attach_capi_driver(&t1pci_driver); attach_capi_driver(&t1pci_driver);
...@@ -256,7 +254,6 @@ static int __init t1pci_init(void) ...@@ -256,7 +254,6 @@ static int __init t1pci_init(void)
err: err:
detach_capi_driver(&t1pci_driver); detach_capi_driver(&t1pci_driver);
out: out:
MOD_DEC_USE_COUNT;
return retval; return retval;
} }
......
...@@ -49,40 +49,41 @@ typedef struct kcapi_carddef { ...@@ -49,40 +49,41 @@ typedef struct kcapi_carddef {
#include <linux/skbuff.h> #include <linux/skbuff.h>
struct capi_interface { #define KCI_CONTRUP 0 /* arg: struct capi_profile */
__u16 (*capi_isinstalled) (void); #define KCI_CONTRDOWN 1 /* arg: NULL */
__u16 (*capi_register) (capi_register_params * rparam, __u16 * applidp); struct capi20_appl {
__u16 (*capi_release) (__u16 applid); u16 applid;
__u16 (*capi_put_message) (__u16 applid, struct sk_buff * msg); capi_register_params rparam;
__u16 (*capi_get_message) (__u16 applid, struct sk_buff ** msgp); void (*recv_message)(struct capi20_appl *ap, struct sk_buff *skb);
__u16 (*capi_set_signal) (__u16 applid, void *private;
void (*signal) (__u16 applid, void *param),
void *param); /* internal to kernelcapi.o */
__u16 (*capi_get_manufacturer) (__u32 contr, __u8 buf[CAPI_MANUFACTURER_LEN]); unsigned long nrecvctlpkt;
__u16 (*capi_get_version) (__u32 contr, struct capi_version * verp); unsigned long nrecvdatapkt;
__u16(*capi_get_serial) (__u32 contr, __u8 serial[CAPI_SERIAL_LEN]); unsigned long nsentctlpkt;
__u16(*capi_get_profile) (__u32 contr, struct capi_profile * profp); unsigned long nsentdatapkt;
/* /* ugly hack to allow for notification of added/removed
* to init controllers, data is always in user memory * controllers. The Right Way (tm) is known. XXX
*/ */
int (*capi_manufacturer) (unsigned int cmd, void *data); void (*callback) (unsigned int cmd, __u32 contr, void *data);
}; };
#define KCI_CONTRUP 0 /* struct capi_profile */ u16 capi20_isinstalled(void);
#define KCI_CONTRDOWN 1 /* NULL */ u16 capi20_register(struct capi20_appl *ap);
u16 capi20_release(struct capi20_appl *ap);
u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb);
u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]);
u16 capi20_get_version(u32 contr, struct capi_version *verp);
u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]);
u16 capi20_get_profile(u32 contr, struct capi_profile *profp);
int capi20_manufacturer(unsigned int cmd, void *data);
struct capi_interface_user { /* temporary hack XXX */
char name[20]; void capi20_set_callback(struct capi20_appl *ap,
void (*callback) (unsigned int cmd, __u32 contr, void *data); void (*callback) (unsigned int cmd, __u32 contr, void *data));
/* internal */
struct list_head user_list;
};
struct capi_interface *attach_capi_interface(struct capi_interface_user *);
int detach_capi_interface(struct capi_interface_user *);
#define CAPI_NOERROR 0x0000 #define CAPI_NOERROR 0x0000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment