Commit 18e030b5 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by James Bottomley

[PATCH] update qlogic and fdomain drivers to use pcmcia_register_driver

parent 07171f64
...@@ -379,26 +379,27 @@ static int fdomain_event(event_t event, int priority, ...@@ -379,26 +379,27 @@ static int fdomain_event(event_t event, int priority,
return 0; return 0;
} /* fdomain_event */ } /* fdomain_event */
/*====================================================================*/ static struct pcmcia_driver fdomain_cs_driver = {
.owner = THIS_MODULE,
static int __init init_fdomain_cs(void) { .drv = {
servinfo_t serv; .name = "fdomain_cs",
DEBUG(0, "%s\n", version); },
CardServices(GetCardServicesInfo, &serv); .attach = fdomain_attach,
if (serv.Revision != CS_RELEASE_CODE) { .detach = fdomain_detach,
printk(KERN_NOTICE "fdomain_cs: Card Services release " };
"does not match!\n");
return -1; static int __init init_fdomain_cs(void)
} {
register_pccard_driver(&dev_info, &fdomain_attach, &fdomain_detach); return pcmcia_register_driver(&fdomain_cs_driver);
return 0;
} }
static void __exit exit_fdomain_cs(void) { static void __exit exit_fdomain_cs(void)
DEBUG(0, "fdomain_cs: unloading\n"); {
unregister_pccard_driver(&dev_info); pcmcia_unregister_driver(&fdomain_cs_driver);
while (dev_list != NULL)
fdomain_detach(dev_list); /* XXX: this really needs to move into generic code.. */
while (dev_list != NULL)
fdomain_detach(dev_list);
} }
module_init(init_fdomain_cs); module_init(init_fdomain_cs);
......
...@@ -397,25 +397,26 @@ static int qlogic_event(event_t event, int priority, event_callback_args_t * arg ...@@ -397,25 +397,26 @@ static int qlogic_event(event_t event, int priority, event_callback_args_t * arg
return 0; return 0;
} /* qlogic_event */ } /* qlogic_event */
/*====================================================================*/
static struct pcmcia_driver qlogic_cs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "qlogic_cs",
},
.attach = qlogic_attach,
.detach = qlogic_detach,
};
static int __init init_qlogic_cs(void) static int __init init_qlogic_cs(void)
{ {
servinfo_t serv; return pcmcia_register_driver(&qlogic_cs_driver);
DEBUG(0, "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "qlogic_cs: Card Services release " "does not match!\n");
return -1;
}
register_pccard_driver(&dev_info, &qlogic_attach, &qlogic_detach);
return 0;
} }
static void __exit exit_qlogic_cs(void) static void __exit exit_qlogic_cs(void)
{ {
DEBUG(0, "qlogic_cs: unloading\n"); pcmcia_unregister_driver(&qlogic_cs_driver);
unregister_pccard_driver(&dev_info);
/* XXX: this really needs to move into generic code.. */
while (dev_list != NULL) while (dev_list != NULL)
qlogic_detach(dev_list); qlogic_detach(dev_list);
} }
......
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