[PATCH] x86_64: CPU hotplug sibling map cleanup
[linux/fpc-iii.git] / drivers / pcmcia / pcmcia_compat.c
blob68b80084f83f28f787c591afd6f2fed87a4e075d
1 /*
2 * PCMCIA 16-bit compatibility functions
4 * The initial developer of the original code is David A. Hinds
5 * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
6 * are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
8 * Copyright (C) 2004 Dominik Brodowski
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
16 #include <linux/config.h>
17 #include <linux/module.h>
18 #include <linux/init.h>
20 #define IN_CARD_SERVICES
21 #include <pcmcia/version.h>
22 #include <pcmcia/cs_types.h>
23 #include <pcmcia/cs.h>
24 #include <pcmcia/bulkmem.h>
25 #include <pcmcia/cistpl.h>
26 #include <pcmcia/ds.h>
27 #include <pcmcia/ss.h>
29 #include "cs_internal.h"
31 int pcmcia_get_first_tuple(client_handle_t handle, tuple_t *tuple)
33 struct pcmcia_socket *s;
34 if (CHECK_HANDLE(handle))
35 return CS_BAD_HANDLE;
36 s = SOCKET(handle);
37 return pccard_get_first_tuple(s, handle->Function, tuple);
39 EXPORT_SYMBOL(pcmcia_get_first_tuple);
41 int pcmcia_get_next_tuple(client_handle_t handle, tuple_t *tuple)
43 struct pcmcia_socket *s;
44 if (CHECK_HANDLE(handle))
45 return CS_BAD_HANDLE;
46 s = SOCKET(handle);
47 return pccard_get_next_tuple(s, handle->Function, tuple);
49 EXPORT_SYMBOL(pcmcia_get_next_tuple);
51 int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple)
53 struct pcmcia_socket *s;
54 if (CHECK_HANDLE(handle))
55 return CS_BAD_HANDLE;
56 s = SOCKET(handle);
57 return pccard_get_tuple_data(s, tuple);
59 EXPORT_SYMBOL(pcmcia_get_tuple_data);
61 int pcmcia_parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
63 return pccard_parse_tuple(tuple, parse);
65 EXPORT_SYMBOL(pcmcia_parse_tuple);
67 int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info)
69 struct pcmcia_socket *s;
70 if (CHECK_HANDLE(handle))
71 return CS_BAD_HANDLE;
72 s = SOCKET(handle);
73 return pccard_validate_cis(s, handle->Function, info);
75 EXPORT_SYMBOL(pcmcia_validate_cis);
77 int pcmcia_get_configuration_info(client_handle_t handle,
78 config_info_t *config)
80 struct pcmcia_socket *s;
82 if ((CHECK_HANDLE(handle)) || !config)
83 return CS_BAD_HANDLE;
84 s = SOCKET(handle);
85 if (!s)
86 return CS_BAD_HANDLE;
87 return pccard_get_configuration_info(s, handle->Function, config);
89 EXPORT_SYMBOL(pcmcia_get_configuration_info);
91 int pcmcia_reset_card(client_handle_t handle, client_req_t *req)
93 struct pcmcia_socket *skt;
95 if (CHECK_HANDLE(handle))
96 return CS_BAD_HANDLE;
97 skt = SOCKET(handle);
98 if (!skt)
99 return CS_BAD_HANDLE;
101 return pccard_reset_card(skt);
103 EXPORT_SYMBOL(pcmcia_reset_card);
105 int pcmcia_get_status(client_handle_t handle, cs_status_t *status)
107 struct pcmcia_socket *s;
108 if (CHECK_HANDLE(handle))
109 return CS_BAD_HANDLE;
110 s = SOCKET(handle);
111 return pccard_get_status(s, handle->Function, status);
113 EXPORT_SYMBOL(pcmcia_get_status);
115 int pcmcia_access_configuration_register(client_handle_t handle,
116 conf_reg_t *reg)
118 struct pcmcia_socket *s;
119 if (CHECK_HANDLE(handle))
120 return CS_BAD_HANDLE;
121 s = SOCKET(handle);
122 return pccard_access_configuration_register(s, handle->Function, reg);
124 EXPORT_SYMBOL(pcmcia_access_configuration_register);