diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-14 18:51:53 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 10:02:33 -0500 |
commit | 1540eec5e5549b2e41704ce77f3f4ba880d2434c (patch) | |
tree | 47a68638c377f61e1035294f4018570c8a1245e0 | |
parent | e904663b4d511884145df54bead401840389853a (diff) |
[PATCH] pcmcia: remove pcmcia_compat.c
Remove the compatibility wrappers, as they can (now) also be implemented
using macros. Please continue using these wrappers instead of new functions
until a new API has stabilized.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r-- | drivers/pcmcia/Makefile | 2 | ||||
-rw-r--r-- | drivers/pcmcia/pcmcia_compat.c | 64 | ||||
-rw-r--r-- | include/pcmcia/cistpl.h | 21 | ||||
-rw-r--r-- | include/pcmcia/cs.h | 6 |
4 files changed, 22 insertions, 71 deletions
diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index bcecf5133b7e..22e17fdfa741 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile | |||
@@ -10,7 +10,7 @@ pcmcia_core-y += cs.o cistpl.o rsrc_mgr.o socket_sysfs.o | |||
10 | pcmcia_core-$(CONFIG_CARDBUS) += cardbus.o | 10 | pcmcia_core-$(CONFIG_CARDBUS) += cardbus.o |
11 | obj-$(CONFIG_PCCARD) += pcmcia_core.o | 11 | obj-$(CONFIG_PCCARD) += pcmcia_core.o |
12 | 12 | ||
13 | pcmcia-y += ds.o pcmcia_compat.o pcmcia_resource.o | 13 | pcmcia-y += ds.o pcmcia_resource.o |
14 | pcmcia-$(CONFIG_PCMCIA_IOCTL) += pcmcia_ioctl.o | 14 | pcmcia-$(CONFIG_PCMCIA_IOCTL) += pcmcia_ioctl.o |
15 | obj-$(CONFIG_PCMCIA) += pcmcia.o | 15 | obj-$(CONFIG_PCMCIA) += pcmcia.o |
16 | 16 | ||
diff --git a/drivers/pcmcia/pcmcia_compat.c b/drivers/pcmcia/pcmcia_compat.c deleted file mode 100644 index 734f28085a9d..000000000000 --- a/drivers/pcmcia/pcmcia_compat.c +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | /* | ||
2 | * PCMCIA 16-bit compatibility functions | ||
3 | * | ||
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. | ||
7 | * | ||
8 | * Copyright (C) 2004 Dominik Brodowski | ||
9 | * | ||
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. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #include <linux/module.h> | ||
17 | #include <linux/init.h> | ||
18 | |||
19 | #define IN_CARD_SERVICES | ||
20 | #include <pcmcia/cs_types.h> | ||
21 | #include <pcmcia/cs.h> | ||
22 | #include <pcmcia/bulkmem.h> | ||
23 | #include <pcmcia/cistpl.h> | ||
24 | #include <pcmcia/ds.h> | ||
25 | #include <pcmcia/ss.h> | ||
26 | |||
27 | #include "cs_internal.h" | ||
28 | |||
29 | int pcmcia_get_first_tuple(struct pcmcia_device *p_dev, tuple_t *tuple) | ||
30 | { | ||
31 | return pccard_get_first_tuple(p_dev->socket, p_dev->func, tuple); | ||
32 | } | ||
33 | EXPORT_SYMBOL(pcmcia_get_first_tuple); | ||
34 | |||
35 | int pcmcia_get_next_tuple(struct pcmcia_device *p_dev, tuple_t *tuple) | ||
36 | { | ||
37 | return pccard_get_next_tuple(p_dev->socket, p_dev->func, tuple); | ||
38 | } | ||
39 | EXPORT_SYMBOL(pcmcia_get_next_tuple); | ||
40 | |||
41 | int pcmcia_get_tuple_data(struct pcmcia_device *p_dev, tuple_t *tuple) | ||
42 | { | ||
43 | return pccard_get_tuple_data(p_dev->socket, tuple); | ||
44 | } | ||
45 | EXPORT_SYMBOL(pcmcia_get_tuple_data); | ||
46 | |||
47 | int pcmcia_parse_tuple(struct pcmcia_device *p_dev, tuple_t *tuple, cisparse_t *parse) | ||
48 | { | ||
49 | return pccard_parse_tuple(tuple, parse); | ||
50 | } | ||
51 | EXPORT_SYMBOL(pcmcia_parse_tuple); | ||
52 | |||
53 | int pcmcia_validate_cis(struct pcmcia_device *p_dev, cisinfo_t *info) | ||
54 | { | ||
55 | return pccard_validate_cis(p_dev->socket, p_dev->func, info); | ||
56 | } | ||
57 | EXPORT_SYMBOL(pcmcia_validate_cis); | ||
58 | |||
59 | |||
60 | int pcmcia_reset_card(struct pcmcia_device *p_dev, client_req_t *req) | ||
61 | { | ||
62 | return pccard_reset_card(p_dev->socket); | ||
63 | } | ||
64 | EXPORT_SYMBOL(pcmcia_reset_card); | ||
diff --git a/include/pcmcia/cistpl.h b/include/pcmcia/cistpl.h index c6a069554fd7..d3bbb19caf81 100644 --- a/include/pcmcia/cistpl.h +++ b/include/pcmcia/cistpl.h | |||
@@ -586,12 +586,7 @@ typedef struct cisdump_t { | |||
586 | cisdata_t Data[CISTPL_MAX_CIS_SIZE]; | 586 | cisdata_t Data[CISTPL_MAX_CIS_SIZE]; |
587 | } cisdump_t; | 587 | } cisdump_t; |
588 | 588 | ||
589 | int pcmcia_get_first_tuple(client_handle_t handle, tuple_t *tuple); | ||
590 | int pcmcia_get_next_tuple(client_handle_t handle, tuple_t *tuple); | ||
591 | int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple); | ||
592 | int pcmcia_parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse); | ||
593 | 589 | ||
594 | int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info); | ||
595 | int pcmcia_replace_cis(struct pcmcia_socket *s, cisdump_t *cis); | 590 | int pcmcia_replace_cis(struct pcmcia_socket *s, cisdump_t *cis); |
596 | 591 | ||
597 | /* don't use outside of PCMCIA core yet */ | 592 | /* don't use outside of PCMCIA core yet */ |
@@ -602,4 +597,20 @@ int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse); | |||
602 | 597 | ||
603 | int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, cisinfo_t *info); | 598 | int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, cisinfo_t *info); |
604 | 599 | ||
600 | /* ... but use these wrappers instead */ | ||
601 | #define pcmcia_get_first_tuple(p_dev, tuple) \ | ||
602 | pccard_get_first_tuple(p_dev->socket, p_dev->func, tuple) | ||
603 | |||
604 | #define pcmcia_get_next_tuple(p_dev, tuple) \ | ||
605 | pccard_get_next_tuple(p_dev->socket, p_dev->func, tuple) | ||
606 | |||
607 | #define pcmcia_get_tuple_data(p_dev, tuple) \ | ||
608 | pccard_get_tuple_data(p_dev->socket, tuple) | ||
609 | |||
610 | #define pcmcia_parse_tuple(p_dev, tuple, parse) \ | ||
611 | pccard_parse_tuple(tuple, parse) | ||
612 | |||
613 | #define pcmcia_validate_cis(p_dev, info) \ | ||
614 | pccard_validate_cis(p_dev->socket, p_dev->func, info) | ||
615 | |||
605 | #endif /* LINUX_CISTPL_H */ | 616 | #endif /* LINUX_CISTPL_H */ |
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index df9b7f706348..eda32a595810 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h | |||
@@ -386,15 +386,19 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, config_req_t *req) | |||
386 | int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); | 386 | int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); |
387 | int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req); | 387 | int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req); |
388 | int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh); | 388 | int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh); |
389 | int pcmcia_reset_card(struct pcmcia_device *p_dev, client_req_t *req); | ||
390 | int pcmcia_suspend_card(struct pcmcia_socket *skt); | 389 | int pcmcia_suspend_card(struct pcmcia_socket *skt); |
391 | int pcmcia_resume_card(struct pcmcia_socket *skt); | 390 | int pcmcia_resume_card(struct pcmcia_socket *skt); |
392 | int pcmcia_eject_card(struct pcmcia_socket *skt); | 391 | int pcmcia_eject_card(struct pcmcia_socket *skt); |
393 | int pcmcia_insert_card(struct pcmcia_socket *skt); | 392 | int pcmcia_insert_card(struct pcmcia_socket *skt); |
393 | int pccard_reset_card(struct pcmcia_socket *skt); | ||
394 | 394 | ||
395 | struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt); | 395 | struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt); |
396 | void pcmcia_put_socket(struct pcmcia_socket *skt); | 396 | void pcmcia_put_socket(struct pcmcia_socket *skt); |
397 | 397 | ||
398 | /* compatibility functions */ | ||
399 | #define pcmcia_reset_card(p_dev, req) \ | ||
400 | pccard_reset_card(p_dev->socket) | ||
401 | |||
398 | #endif /* __KERNEL__ */ | 402 | #endif /* __KERNEL__ */ |
399 | 403 | ||
400 | #endif /* _LINUX_CS_H */ | 404 | #endif /* _LINUX_CS_H */ |