diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-06-27 19:28:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-27 21:03:20 -0400 |
commit | 3448139b41b9e3b8799eed7d427cd50789dadc3e (patch) | |
tree | 9c6c2938220fb6826de49f7bf1b7fe3ecdc801ad /drivers/pcmcia/pcmcia_resource.c | |
parent | 33519ddd43f4adc221ee7b2801dedd19ac97540b (diff) |
[PATCH] pcmcia: ds.c cleanup
Clean up ds.c
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 62 |
1 files changed, 35 insertions, 27 deletions
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 |