diff options
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/pcmcia_compat.c | 34 | ||||
-rw-r--r-- | drivers/pcmcia/pcmcia_ioctl.c | 23 | ||||
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 62 |
3 files changed, 58 insertions, 61 deletions
diff --git a/drivers/pcmcia/pcmcia_compat.c b/drivers/pcmcia/pcmcia_compat.c index 68b80084f83f..1cc83317e7e3 100644 --- a/drivers/pcmcia/pcmcia_compat.c +++ b/drivers/pcmcia/pcmcia_compat.c | |||
@@ -74,19 +74,6 @@ int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info) | |||
74 | } | 74 | } |
75 | EXPORT_SYMBOL(pcmcia_validate_cis); | 75 | EXPORT_SYMBOL(pcmcia_validate_cis); |
76 | 76 | ||
77 | int pcmcia_get_configuration_info(client_handle_t handle, | ||
78 | config_info_t *config) | ||
79 | { | ||
80 | struct pcmcia_socket *s; | ||
81 | |||
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); | ||
88 | } | ||
89 | EXPORT_SYMBOL(pcmcia_get_configuration_info); | ||
90 | 77 | ||
91 | int pcmcia_reset_card(client_handle_t handle, client_req_t *req) | 78 | int pcmcia_reset_card(client_handle_t handle, client_req_t *req) |
92 | { | 79 | { |
@@ -102,24 +89,3 @@ int pcmcia_reset_card(client_handle_t handle, client_req_t *req) | |||
102 | } | 89 | } |
103 | EXPORT_SYMBOL(pcmcia_reset_card); | 90 | EXPORT_SYMBOL(pcmcia_reset_card); |
104 | 91 | ||
105 | int pcmcia_get_status(client_handle_t handle, cs_status_t *status) | ||
106 | { | ||
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); | ||
112 | } | ||
113 | EXPORT_SYMBOL(pcmcia_get_status); | ||
114 | |||
115 | int pcmcia_access_configuration_register(client_handle_t handle, | ||
116 | conf_reg_t *reg) | ||
117 | { | ||
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); | ||
123 | } | ||
124 | EXPORT_SYMBOL(pcmcia_access_configuration_register); | ||
125 | |||
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index fa2a79d29e16..3084d8a3ba41 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c | |||
@@ -71,6 +71,29 @@ extern int ds_pc_debug; | |||
71 | #define ds_dbg(lvl, fmt, arg...) do { } while (0) | 71 | #define ds_dbg(lvl, fmt, arg...) do { } while (0) |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | static const char *release = "Linux Kernel Card Services"; | ||
75 | |||
76 | /** pcmcia_get_card_services_info | ||
77 | * | ||
78 | * Return information about this version of Card Services | ||
79 | */ | ||
80 | static int pcmcia_get_card_services_info(servinfo_t *info) | ||
81 | { | ||
82 | unsigned int socket_count = 0; | ||
83 | struct list_head *tmp; | ||
84 | info->Signature[0] = 'C'; | ||
85 | info->Signature[1] = 'S'; | ||
86 | down_read(&pcmcia_socket_list_rwsem); | ||
87 | list_for_each(tmp, &pcmcia_socket_list) | ||
88 | socket_count++; | ||
89 | up_read(&pcmcia_socket_list_rwsem); | ||
90 | info->Count = socket_count; | ||
91 | info->Revision = CS_RELEASE_CODE; | ||
92 | info->CSLevel = 0x0210; | ||
93 | info->VendorString = (char *)release; | ||
94 | return CS_SUCCESS; | ||
95 | } /* get_card_services_info */ | ||
96 | |||
74 | 97 | ||
75 | /* backwards-compatible accessing of driver --- by name! */ | 98 | /* backwards-compatible accessing of driver --- by name! */ |
76 | 99 | ||
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index cf66b9978942..9ed3d4a9b99c 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -36,8 +36,6 @@ | |||
36 | #include "ds_internal.h" | 36 | #include "ds_internal.h" |
37 | 37 | ||
38 | 38 | ||
39 | static const char *release = "Linux Kernel Card Services"; | ||
40 | |||
41 | /* Access speed for IO windows */ | 39 | /* Access speed for IO windows */ |
42 | static int io_speed = 0; | 40 | static int io_speed = 0; |
43 | module_param(io_speed, int, 0444); | 41 | module_param(io_speed, int, 0444); |
@@ -202,7 +200,18 @@ int pccard_access_configuration_register(struct pcmcia_socket *s, | |||
202 | } | 200 | } |
203 | return CS_SUCCESS; | 201 | return CS_SUCCESS; |
204 | } /* pccard_access_configuration_register */ | 202 | } /* pccard_access_configuration_register */ |
205 | EXPORT_SYMBOL(pccard_access_configuration_register); | 203 | |
204 | int pcmcia_access_configuration_register(client_handle_t handle, | ||
205 | conf_reg_t *reg) | ||
206 | { | ||
207 | struct pcmcia_socket *s; | ||
208 | if (CHECK_HANDLE(handle)) | ||
209 | return CS_BAD_HANDLE; | ||
210 | s = SOCKET(handle); | ||
211 | return pccard_access_configuration_register(s, handle->Function, reg); | ||
212 | } | ||
213 | EXPORT_SYMBOL(pcmcia_access_configuration_register); | ||
214 | |||
206 | 215 | ||
207 | 216 | ||
208 | int pccard_get_configuration_info(struct pcmcia_socket *s, | 217 | int pccard_get_configuration_info(struct pcmcia_socket *s, |
@@ -260,31 +269,20 @@ int pccard_get_configuration_info(struct pcmcia_socket *s, | |||
260 | 269 | ||
261 | return CS_SUCCESS; | 270 | return CS_SUCCESS; |
262 | } /* pccard_get_configuration_info */ | 271 | } /* pccard_get_configuration_info */ |
263 | EXPORT_SYMBOL(pccard_get_configuration_info); | ||
264 | 272 | ||
265 | 273 | int pcmcia_get_configuration_info(client_handle_t handle, | |
266 | /** pcmcia_get_card_services_info | 274 | config_info_t *config) |
267 | * | ||
268 | * Return information about this version of Card Services | ||
269 | */ | ||
270 | |||
271 | int pcmcia_get_card_services_info(servinfo_t *info) | ||
272 | { | 275 | { |
273 | unsigned int socket_count = 0; | 276 | struct pcmcia_socket *s; |
274 | struct list_head *tmp; | 277 | |
275 | info->Signature[0] = 'C'; | 278 | if ((CHECK_HANDLE(handle)) || !config) |
276 | info->Signature[1] = 'S'; | 279 | return CS_BAD_HANDLE; |
277 | down_read(&pcmcia_socket_list_rwsem); | 280 | s = SOCKET(handle); |
278 | list_for_each(tmp, &pcmcia_socket_list) | 281 | if (!s) |
279 | socket_count++; | 282 | return CS_BAD_HANDLE; |
280 | up_read(&pcmcia_socket_list_rwsem); | 283 | return pccard_get_configuration_info(s, handle->Function, config); |
281 | info->Count = socket_count; | 284 | } |
282 | info->Revision = CS_RELEASE_CODE; | 285 | EXPORT_SYMBOL(pcmcia_get_configuration_info); |
283 | info->CSLevel = 0x0210; | ||
284 | info->VendorString = (char *)release; | ||
285 | return CS_SUCCESS; | ||
286 | } /* get_card_services_info */ | ||
287 | EXPORT_SYMBOL(pcmcia_get_card_services_info); | ||
288 | 286 | ||
289 | 287 | ||
290 | /** pcmcia_get_window | 288 | /** pcmcia_get_window |
@@ -379,7 +377,17 @@ int pccard_get_status(struct pcmcia_socket *s, unsigned int function, | |||
379 | (val & SS_READY) ? CS_EVENT_READY_CHANGE : 0; | 377 | (val & SS_READY) ? CS_EVENT_READY_CHANGE : 0; |
380 | return CS_SUCCESS; | 378 | return CS_SUCCESS; |
381 | } /* pccard_get_status */ | 379 | } /* pccard_get_status */ |
382 | EXPORT_SYMBOL(pccard_get_status); | 380 | |
381 | int pcmcia_get_status(client_handle_t handle, cs_status_t *status) | ||
382 | { | ||
383 | struct pcmcia_socket *s; | ||
384 | if (CHECK_HANDLE(handle)) | ||
385 | return CS_BAD_HANDLE; | ||
386 | s = SOCKET(handle); | ||
387 | return pccard_get_status(s, handle->Function, status); | ||
388 | } | ||
389 | EXPORT_SYMBOL(pcmcia_get_status); | ||
390 | |||
383 | 391 | ||
384 | 392 | ||
385 | /** pcmcia_get_mem_page | 393 | /** pcmcia_get_mem_page |