[PATCH] ioremap balanced with iounmap for drivers/pcmcia
[linux-2.6.git] / drivers / pcmcia / au1000_generic.c
index 5387de6..551bde5 100644 (file)
@@ -449,6 +449,16 @@ out_err:
                del_timer_sync(&skt->poll_timer);
                pcmcia_unregister_socket(&skt->socket);
                flush_scheduled_work();
+               if (i == 0) {
+                       iounmap(skt->virt_io + (u32)mips_io_port_base);
+                       skt->virt_io = NULL;
+               }
+#ifndef CONFIG_MIPS_XXS1500
+               else {
+                       iounmap(skt->virt_io + (u32)mips_io_port_base);
+                       skt->virt_io = NULL;
+               }
+#endif
                ops->hw_shutdown(skt);
 
        }