mtd/drivers/mtd/maps pcmciamtd.c,1.39,1.40
spse at infradead.org
spse at infradead.org
Wed May 7 06:13:50 EDT 2003
Update of /home/cvs/mtd/drivers/mtd/maps
In directory phoenix.infradead.org:/tmp/cvs-serv16111
Modified Files:
pcmciamtd.c
Log Message:
Changes for 2.5
Dont use own cs_error anymore
Use pcmcia_register_driver/pcmcia_unregister_driver instead of
register_pccard_driver/unregister_pccard_driver
Index: pcmciamtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/pcmciamtd.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- pcmciamtd.c 6 Jan 2003 17:51:38 -0000 1.39
+++ pcmciamtd.c 7 May 2003 10:13:47 -0000 1.40
@@ -106,11 +106,13 @@
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69)
static inline void cs_error(client_handle_t handle, int func, int ret)
{
error_info_t err = { func, ret };
CardServices(ReportError, handle, &err);
}
+#endif
/* read/write{8,16} copy_{from,to} routines with window remapping to access whole card */
@@ -828,6 +830,18 @@
}
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,68)
+static struct pcmcia_driver pcmciamtd_driver = {
+ .drv = {
+ .name = "pcmciamtd"
+ },
+ .attach = pcmciamtd_attach,
+ .detach = pcmciamtd_detach,
+ .owner = THIS_MODULE
+};
+#endif
+
+
static int __init init_pcmciamtd(void)
{
servinfo_t serv;
@@ -851,15 +865,24 @@
info("bad mem_type (%d), using default", mem_type);
mem_type = 0;
}
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,68)
+ return pcmcia_register_driver(&pcmciamtd_driver);
+#else
register_pccard_driver(&dev_info, &pcmciamtd_attach, &pcmciamtd_detach);
return 0;
+#endif
}
static void __exit exit_pcmciamtd(void)
{
DEBUG(1, DRIVER_DESC " unloading");
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,68)
+ pcmcia_unregister_driver(&pcmciamtd_driver);
+#else
unregister_pccard_driver(&dev_info);
+#endif
while(dev_list) {
dev_link_t *link = dev_list;
More information about the linux-mtd-cvs
mailing list