Commit 305c1788 authored by Kai Germaschewski's avatar Kai Germaschewski

Merge tp1.ruhr-uni-bochum.de:/scratch/kai/kernel/v2.5/linux-2.5

into tp1.ruhr-uni-bochum.de:/scratch/kai/kernel/v2.5/linux-2.5.isdn
parents ad6ea5a3 ace86cdf
...@@ -510,29 +510,30 @@ static int avmcs_event(event_t event, int priority, ...@@ -510,29 +510,30 @@ static int avmcs_event(event_t event, int priority,
return 0; return 0;
} /* avmcs_event */ } /* avmcs_event */
/*====================================================================*/ static struct pcmcia_driver avmcs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "avmcs_cs",
},
.attach = avmcs_attach,
.detach = avmcs_detach,
};
static int __init avmcs_init(void) static int __init avmcs_init(void)
{ {
servinfo_t serv; return pcmcia_register_driver(&avmcs_driver);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "avm_cs: Card Services release "
"does not match!\n");
return -1;
}
register_pccard_driver(&dev_info, &avmcs_attach, &avmcs_detach);
return 0;
} }
static void __exit avmcs_exit(void) static void __exit avmcs_exit(void)
{ {
unregister_pccard_driver(&dev_info); pcmcia_unregister_driver(&avmcs_driver);
while (dev_list != NULL) {
if (dev_list->state & DEV_CONFIG) /* XXX: this really needs to move into generic code.. */
avmcs_release((u_long)dev_list); while (dev_list != NULL) {
avmcs_detach(dev_list); if (dev_list->state & DEV_CONFIG)
} avmcs_release((u_long)dev_list);
avmcs_detach(dev_list);
}
} }
module_init(avmcs_init); module_init(avmcs_init);
......
...@@ -153,6 +153,8 @@ static dev_link_t *avma1cs_attach(void) ...@@ -153,6 +153,8 @@ static dev_link_t *avma1cs_attach(void)
/* Initialize the dev_link_t structure */ /* Initialize the dev_link_t structure */
link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL); link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL);
if (!link)
return NULL;
memset(link, 0, sizeof(struct dev_link_t)); memset(link, 0, sizeof(struct dev_link_t));
link->release.function = &avma1cs_release; link->release.function = &avma1cs_release;
link->release.data = (u_long)link; link->release.data = (u_long)link;
...@@ -186,6 +188,10 @@ static dev_link_t *avma1cs_attach(void) ...@@ -186,6 +188,10 @@ static dev_link_t *avma1cs_attach(void)
/* Allocate space for private device-specific data */ /* Allocate space for private device-specific data */
local = kmalloc(sizeof(local_info_t), GFP_KERNEL); local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
if (!local) {
kfree(link);
return NULL;
}
memset(local, 0, sizeof(local_info_t)); memset(local, 0, sizeof(local_info_t));
link->priv = local; link->priv = local;
...@@ -515,30 +521,30 @@ static int avma1cs_event(event_t event, int priority, ...@@ -515,30 +521,30 @@ static int avma1cs_event(event_t event, int priority,
return 0; return 0;
} /* avma1cs_event */ } /* avma1cs_event */
/*====================================================================*/ static struct pcmcia_driver avma1cs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "avma1_cs",
},
.attach = avma1cs_attach,
.detach = avma1cs_detach,
};
static int __init init_avma1_cs(void) static int __init init_avma1_cs(void)
{ {
servinfo_t serv; return pcmcia_register_driver(&avma1cs_driver);
DEBUG(0, "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "avma1_cs: Card Services release "
"does not match!\n");
return -1;
}
register_pccard_driver(&dev_info, &avma1cs_attach, &avma1cs_detach);
return 0;
} }
static void __exit exit_avma1_cs(void) static void __exit exit_avma1_cs(void)
{ {
DEBUG(0, "avma1_cs: unloading\n"); pcmcia_unregister_driver(&avma1cs_driver);
unregister_pccard_driver(&dev_info);
while (dev_list != NULL) /* XXX: this really needs to move into generic code.. */
if (dev_list->state & DEV_CONFIG) while (dev_list != NULL) {
avma1cs_release((u_long)dev_list); if (dev_list->state & DEV_CONFIG)
avma1cs_detach(dev_list); avma1cs_release((u_long)dev_list);
avma1cs_detach(dev_list);
}
} }
module_init(init_avma1_cs); module_init(init_avma1_cs);
......
...@@ -531,28 +531,27 @@ static int elsa_cs_event(event_t event, int priority, ...@@ -531,28 +531,27 @@ static int elsa_cs_event(event_t event, int priority,
return 0; return 0;
} /* elsa_cs_event */ } /* elsa_cs_event */
/*====================================================================*/ static struct pcmcia_driver elsa_cs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "elsa_cs",
},
.attach = elsa_cs_attach,
.detach = elsa_cs_detach,
};
static int __init init_elsa_cs(void) static int __init init_elsa_cs(void)
{ {
servinfo_t serv; return pcmcia_register_driver(&elsa_cs_driver);
DEBUG(0, "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "elsa_cs: Card Services release "
"does not match!\n");
return -1;
}
register_pccard_driver(&dev_info, &elsa_cs_attach, &elsa_cs_detach);
return 0;
} }
static void __exit exit_elsa_cs(void) static void __exit exit_elsa_cs(void)
{ {
DEBUG(0, "elsa_cs: unloading\n"); pcmcia_unregister_driver(&elsa_cs_driver);
unregister_pccard_driver(&dev_info);
while (dev_list != NULL) /* XXX: this really needs to move into generic code.. */
elsa_cs_detach(dev_list); while (dev_list != NULL)
elsa_cs_detach(dev_list);
} }
module_init(init_elsa_cs); module_init(init_elsa_cs);
......
...@@ -633,34 +633,32 @@ static int sedlbauer_event(event_t event, int priority, ...@@ -633,34 +633,32 @@ static int sedlbauer_event(event_t event, int priority,
return 0; return 0;
} /* sedlbauer_event */ } /* sedlbauer_event */
/*====================================================================*/ static struct pcmcia_driver sedlbauer_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "sedlbauer_cs",
},
.attach = sedlbauer_attach,
.detach = sedlbauer_detach,
};
static int __init init_sedlbauer_cs(void) static int __init init_sedlbauer_cs(void)
{ {
servinfo_t serv; return pcmcia_register_driver(&sedlbauer_driver);
DEBUG(0, "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "sedlbauer_cs: Card Services release "
"does not match!\n");
return -1;
}
register_pccard_driver(&dev_info, &sedlbauer_attach, &sedlbauer_detach);
return 0;
} }
static void __exit exit_sedlbauer_cs(void) static void __exit exit_sedlbauer_cs(void)
{ {
DEBUG(0, "sedlbauer_cs: unloading\n"); pcmcia_unregister_driver(&sedlbauer_driver);
unregister_pccard_driver(&dev_info);
while (dev_list != NULL) { /* XXX: this really needs to move into generic code.. */
del_timer(&dev_list->release); while (dev_list != NULL) {
if (dev_list->state & DEV_CONFIG) del_timer(&dev_list->release);
sedlbauer_release((u_long)dev_list); if (dev_list->state & DEV_CONFIG)
sedlbauer_detach(dev_list); sedlbauer_release((u_long)dev_list);
} sedlbauer_detach(dev_list);
}
} }
module_init(init_sedlbauer_cs); module_init(init_sedlbauer_cs);
module_exit(exit_sedlbauer_cs); module_exit(exit_sedlbauer_cs);
...@@ -145,6 +145,7 @@ irqreturn_t tpam_irq(int irq, void *dev_id, struct pt_regs *regs) ...@@ -145,6 +145,7 @@ irqreturn_t tpam_irq(int irq, void *dev_id, struct pt_regs *regs)
do { do {
hpic = readl(card->bar0 + TPAM_HPIC_REGISTER); hpic = readl(card->bar0 + TPAM_HPIC_REGISTER);
if (waiting_too_long++ > 0xfffffff) { if (waiting_too_long++ > 0xfffffff) {
kfree_skb(skb);
spin_unlock(&card->lock); spin_unlock(&card->lock);
printk(KERN_ERR "TurboPAM(tpam_irq): " printk(KERN_ERR "TurboPAM(tpam_irq): "
"waiting too long...\n"); "waiting too long...\n");
......
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