pcmcia: pxa2xx/vpac270: free gpios on exist rather than requesting
[linux-2.6.git] / drivers / pcmcia / rsrc_mgr.c
index 71838ca..aa628ed 100644 (file)
@@ -16,9 +16,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 
-#include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
-#include <pcmcia/cs.h>
 #include <pcmcia/cistpl.h>
 #include "cs_internal.h"
 
@@ -46,14 +44,23 @@ struct resource *pcmcia_make_resource(unsigned long start, unsigned long end,
        return res;
 }
 
+static int static_find_io(struct pcmcia_socket *s, unsigned int attr,
+                       unsigned int *base, unsigned int num,
+                       unsigned int align, struct resource **parent)
+{
+       if (!s->io_offset)
+               return -EINVAL;
+       *base = s->io_offset | (*base & 0x0fff);
+       *parent = NULL;
+
+       return 0;
+}
+
 
 struct pccard_resource_ops pccard_static_ops = {
        .validate_mem = NULL,
-       .adjust_io_region = NULL,
-       .find_io = NULL,
+       .find_io = static_find_io,
        .find_mem = NULL,
-       .add_io = NULL,
-       .add_mem = NULL,
        .init = static_init,
        .exit = NULL,
 };