nfsd4: setclientid_confirm callback-change fixes
[safe/jmp/linux-2.6] / drivers / pcmcia / m8xx_pcmcia.c
index 3c45142..d1ad096 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * m8xx_pcmcia.c - Linux PCMCIA socket driver for the mpc8xx series.
  *
- * (C) 1999-2000 Magnus Damm <damm@bitsmart.com>
+ * (C) 1999-2000 Magnus Damm <damm@opensource.se>
  * (C) 2001-2002 Montavista Software, Inc.
  *     <mlocke@mvista.com>
  *
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/fsl_devices.h>
+#include <linux/bitops.h>
+#include <linux/of_device.h>
+#include <linux/of_platform.h>
 
 #include <asm/io.h>
-#include <asm/bitops.h>
 #include <asm/system.h>
 #include <asm/time.h>
 #include <asm/mpc8xx.h>
 #include <asm/8xx_immap.h>
 #include <asm/irq.h>
 #include <asm/fs_pd.h>
-#include <asm/of_device.h>
-#include <asm/of_platform.h>
 
-#include <pcmcia/version.h>
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/ss.h>
 
-#ifdef PCMCIA_DEBUG
-static int pc_debug = PCMCIA_DEBUG;
+#ifdef CONFIG_PCMCIA_DEBUG
+static int pc_debug;
 module_param(pc_debug, int, 0);
 #define dprintk(args...) printk(KERN_DEBUG "m8xx_pcmcia: " args);
 #else
@@ -851,7 +850,7 @@ static int m8xx_set_socket(struct pcmcia_socket *sock, socket_state_t * state)
           I tried to control the CxOE signal with SS_OUTPUT_ENA,
           but the reset signal seems connected via the 541.
           If the CxOE is left high are some signals tristated and
-          no pullups are present -> the cards act wierd.
+          no pullups are present -> the cards act weird.
           So right now the buffers are enabled if the power is on. */
 
        if (state->Vcc || state->Vpp)
@@ -1174,8 +1173,10 @@ static int __init m8xx_probe(struct of_device *ofdev,
 
        pcmcia_schlvl = irq_of_parse_and_map(np, 0);
        hwirq = irq_map[pcmcia_schlvl].hwirq;
-       if (pcmcia_schlvl < 0)
+       if (pcmcia_schlvl < 0) {
+               iounmap(pcmcia);
                return -EINVAL;
+       }
 
        m8xx_pgcrx[0] = &pcmcia->pcmc_pgcra;
        m8xx_pgcrx[1] = &pcmcia->pcmc_pgcrb;
@@ -1189,6 +1190,7 @@ static int __init m8xx_probe(struct of_device *ofdev,
                        driver_name, socket)) {
                pcmcia_error("Cannot allocate IRQ %u for SCHLVL!\n",
                             pcmcia_schlvl);
+               iounmap(pcmcia);
                return -1;
        }
 
@@ -1284,6 +1286,7 @@ static int m8xx_remove(struct of_device *ofdev)
        }
        for (i = 0; i < PCMCIA_SOCKETS_NO; i++)
                pcmcia_unregister_socket(&socket[i].socket);
+       iounmap(pcmcia);
 
        free_irq(pcmcia_schlvl, NULL);
 
@@ -1316,7 +1319,7 @@ static struct of_device_id m8xx_pcmcia_match[] = {
 MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match);
 
 static struct of_platform_driver m8xx_pcmcia_driver = {
-       .name = (char *)driver_name,
+       .name = driver_name,
        .match_table = m8xx_pcmcia_match,
        .probe = m8xx_probe,
        .remove = m8xx_remove,