- patches.fixes/patch-2.6.11-rc1: 2.6.11-rc1.
[linux-flexiantxendom0-3.2.10.git] / drivers / pcmcia / cs_internal.h
index fbce6b6..b517e03 100644 (file)
@@ -1,19 +1,15 @@
 /*
- * cs_internal.h 1.57 2002/10/24 06:11:43
+ * cs_internal.h
  *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License
- * at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- * the License for the specific language governing rights and
- * limitations under the License. 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
  *
  * The initial developer of the original code is David A. Hinds
  * <dahinds@users.sourceforge.net>.  Portions created by David A. Hinds
- *  are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
+ * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
+ *
+ * (C) 1999            David A. Hinds
  */
 
 #ifndef _LINUX_CS_INTERNAL_H
 #include <linux/config.h>
 
 #define CLIENT_MAGIC   0x51E6
-typedef struct client_t {
-    u_short            client_magic;
-    struct pcmcia_socket *Socket;
-    u_char             Function;
-    dev_info_t         dev_info;
-    u_int              Attributes;
-    u_int              state;
-    event_t            EventMask, PendingEvents;
-    int (*event_handler)(event_t event, int priority,
-                        event_callback_args_t *);
-    event_callback_args_t event_callback_args;
-    struct client_t    *next;
-} client_t;
+typedef struct client_t client_t;
 
 /* Flags in client state */
 #define CLIENT_CONFIG_LOCKED   0x0001
@@ -151,15 +135,13 @@ int pccard_read_tuple(struct pcmcia_socket *s, unsigned int function, cisdata_t
 /* In rsrc_mgr */
 void pcmcia_validate_mem(struct pcmcia_socket *s);
 struct resource *find_io_region(unsigned long base, int num, unsigned long align,
-                  char *name, struct pcmcia_socket *s);
+                  struct pcmcia_socket *s);
 int adjust_io_region(struct resource *res, unsigned long r_start,
                     unsigned long r_end, struct pcmcia_socket *s);
 struct resource *find_mem_region(u_long base, u_long num, u_long align,
-                   int low, char *name, struct pcmcia_socket *s);
-int try_irq(u_int Attributes, int irq, int specific);
-void undo_irq(u_int Attributes, int irq);
+                   int low, struct pcmcia_socket *s);
 int adjust_resource_info(client_handle_t handle, adjust_t *adj);
-void release_resource_db(void);
+void release_resource_db(struct pcmcia_socket *s);
 
 /* In socket_sysfs.c */
 extern struct class_interface pccard_sysfs_interface;
@@ -173,6 +155,14 @@ int pccard_reset_card(struct pcmcia_socket *skt);
 int pccard_get_status(struct pcmcia_socket *s, unsigned int function, cs_status_t *status);
 int pccard_access_configuration_register(struct pcmcia_socket *s, unsigned int function, conf_reg_t *reg);
 
+
+struct pcmcia_callback{
+       struct module   *owner;
+       int             (*event) (struct pcmcia_socket *s, event_t event, int priority);
+};
+
+int pccard_register_pcmcia(struct pcmcia_socket *s, struct pcmcia_callback *c);
+
 #define cs_socket_name(skt)    ((skt)->dev.class_id)
 
 #ifdef DEBUG