]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pcmcia/cs_internal.h
[PATCH] pcmcia: validate_mem shouldn't be void
[linux-2.6-omap-h63xx.git] / drivers / pcmcia / cs_internal.h
index 0b4c18edfa498ef02a21bb56894e91b6a95dc3e4..634426b78f2cd6ddd583ee0e2bfc66acf848b445 100644 (file)
@@ -17,9 +17,6 @@
 
 #include <linux/config.h>
 
-#define CLIENT_MAGIC   0x51E6
-typedef struct client_t client_t;
-
 /* Flags in client state */
 #define CLIENT_CONFIG_LOCKED   0x0001
 #define CLIENT_IRQ_REQ         0x0002
@@ -45,7 +42,6 @@ typedef struct region_t {
 typedef struct config_t {
     u_int              state;
     u_int              Attributes;
-    u_int              Vcc, Vpp1, Vpp2;
     u_int              IntType;
     u_int              ConfigBase;
     u_char             Status, Pin, Copy, Option, ExtStatus;
@@ -99,23 +95,11 @@ static inline void cs_socket_put(struct pcmcia_socket *skt)
        }
 }
 
-#define CHECK_HANDLE(h) \
-    (((h) == NULL) || ((h)->client_magic != CLIENT_MAGIC))
-
 #define CHECK_SOCKET(s) \
     (((s) >= sockets) || (socket_table[s]->ops == NULL))
 
-#define SOCKET(h) (h->Socket)
-#define CONFIG(h) (&SOCKET(h)->config[(h)->Function])
-
-#define CHECK_REGION(r) \
-    (((r) == NULL) || ((r)->region_magic != REGION_MAGIC))
-
-#define CHECK_ERASEQ(q) \
-    (((q) == NULL) || ((q)->eraseq_magic != ERASEQ_MAGIC))
-
-#define EVENT(h, e, p) \
-    ((h)->event_handler((e), (p), &(h)->event_callback_args))
+#define SOCKET(h) (h->socket)
+#define CONFIG(h) (&SOCKET(h)->config[(h)->func])
 
 /* In cardbus.c */
 int cb_alloc(struct pcmcia_socket *s);
@@ -133,7 +117,7 @@ int verify_cis_cache(struct pcmcia_socket *s);
 int pccard_read_tuple(struct pcmcia_socket *s, unsigned int function, cisdata_t code, void *parse);
 
 /* In rsrc_mgr */
-void pcmcia_validate_mem(struct pcmcia_socket *s);
+int pcmcia_validate_mem(struct pcmcia_socket *s);
 struct resource *pcmcia_find_io_region(unsigned long base, int num, unsigned long align,
                   struct pcmcia_socket *s);
 int pcmcia_adjust_io_region(struct resource *res, unsigned long r_start,