]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/pcmcia/rsrc_nonstatic.c
edac: mpc85xx: add support for new MPCxxx/Pxxxx EDAC controllers
[karo-tx-linux.git] / drivers / pcmcia / rsrc_nonstatic.c
index 0cca08ff65a80dedb74add623c6a3607628ffe97..96f348b35fdea356daabb8b1836d438b163ca117 100644 (file)
@@ -63,6 +63,9 @@ struct socket_data {
 #define MEM_PROBE_LOW  (1 << 0)
 #define MEM_PROBE_HIGH (1 << 1)
 
+/* Action field */
+#define REMOVE_MANAGED_RESOURCE                1
+#define ADD_MANAGED_RESOURCE           2
 
 /*======================================================================
 
@@ -715,7 +718,7 @@ static struct resource *__nonstatic_find_io_region(struct pcmcia_socket *s,
 
 static int nonstatic_find_io(struct pcmcia_socket *s, unsigned int attr,
                        unsigned int *base, unsigned int num,
-                       unsigned int align)
+                       unsigned int align, struct resource **parent)
 {
        int i, ret = 0;
 
@@ -757,6 +760,7 @@ static int nonstatic_find_io(struct pcmcia_socket *s, unsigned int attr,
                                ((res->flags & ~IORESOURCE_BITS) |
                                        (attr & IORESOURCE_BITS));
                        s->io[i].InUse = num;
+                       *parent = res;
                        return 0;
                }
 
@@ -772,6 +776,7 @@ static int nonstatic_find_io(struct pcmcia_socket *s, unsigned int attr,
                                        continue;
                                *base = try;
                                s->io[i].InUse += num;
+                               *parent = res;
                                return 0;
                        }
                }
@@ -790,6 +795,7 @@ static int nonstatic_find_io(struct pcmcia_socket *s, unsigned int attr,
                                        continue;
                                *base = try;
                                s->io[i].InUse += num;
+                               *parent = res;
                                return 0;
                        }
                }