[patch 5/21] pcmcia: remove obsolete code
Dominik Brodowski
linux at dominikbrodowski.de
Fri Dec 17 05:06:32 EST 2004
Remove the code marked as obsolete -- nobody complained.
Signed-off-by: Dominik Broodwski <linux at brodo.de>
---
drivers/pcmcia/Kconfig | 12 --------
drivers/pcmcia/bulkmem.c | 46 -------------------------------
drivers/pcmcia/cs.c | 60 -----------------------------------------
drivers/pcmcia/pcmcia_compat.c | 20 -------------
include/pcmcia/cs.h | 7 ----
5 files changed, 145 deletions(-)
Index: 2.6.10-rc3/drivers/pcmcia/Kconfig
===================================================================
--- 2.6.10-rc3.orig/drivers/pcmcia/Kconfig 2004-12-05 10:24:14.412655920 +0100
+++ 2.6.10-rc3/drivers/pcmcia/Kconfig 2004-12-05 10:26:05.058835144 +0100
@@ -39,18 +39,6 @@
In all the above examples, N is the debugging verbosity
level.
-config PCMCIA_OBSOLETE
- bool "Enable obsolete PCCARD code"
- depends on PCCARD != n
- help
- Say Y here to enable some code found in the PCCARD subsystem
- which has no in-kernel usage, but might be needed for certain
- external PCMCIA drivers. If you do need to say Y here so that
- one such driver compiles and/or works correctly, please report
- this to linux-pcmcia <at> lists.infradead.org
-
- If unsure, say N
-
config PCMCIA
tristate "16-bit PCMCIA support"
depends on PCCARD
Index: 2.6.10-rc3/drivers/pcmcia/bulkmem.c
===================================================================
--- 2.6.10-rc3.orig/drivers/pcmcia/bulkmem.c 2004-12-05 10:26:03.901011160 +0100
+++ 2.6.10-rc3/drivers/pcmcia/bulkmem.c 2004-12-05 10:26:05.055835600 +0100
@@ -152,49 +152,3 @@
return pccard_match_region(rgn->next, rgn);
} /* get_next_region */
-
-#ifdef CONFIG_PCMCIA_OBSOLETE
-
-static int match_region(client_handle_t handle, memory_handle_t list,
- region_info_t *match)
-{
- while (list != NULL) {
- if (!(handle->Attributes & INFO_MTD_CLIENT) ||
- (strcmp(handle->dev_info, list->dev_info) == 0)) {
- *match = list->info;
- return CS_SUCCESS;
- }
- list = list->info.next;
- }
- return CS_NO_MORE_ITEMS;
-} /* match_region */
-
-int pcmcia_get_first_region(client_handle_t handle, region_info_t *rgn)
-{
- struct pcmcia_socket *s = SOCKET(handle);
- if (CHECK_HANDLE(handle))
- return CS_BAD_HANDLE;
-
- if ((handle->Attributes & INFO_MASTER_CLIENT) &&
- (!(s->state & SOCKET_REGION_INFO))) {
- setup_regions(s, handle->Function, 0, &s->c_region);
- setup_regions(s, handle->Function, 1, &s->a_region);
- s->state |= SOCKET_REGION_INFO;
- }
-
- if (rgn->Attributes & REGION_TYPE_AM)
- return match_region(handle, s->a_region, rgn);
- else
- return match_region(handle, s->c_region, rgn);
-} /* get_first_region */
-EXPORT_SYMBOL(pcmcia_get_first_region);
-
-int pcmcia_get_next_region(client_handle_t handle, region_info_t *rgn)
-{
- if (CHECK_HANDLE(handle))
- return CS_BAD_HANDLE;
- return match_region(handle, rgn->next, rgn);
-} /* get_next_region */
-EXPORT_SYMBOL(pcmcia_get_next_region);
-
-#endif
Index: 2.6.10-rc3/drivers/pcmcia/cs.c
===================================================================
--- 2.6.10-rc3.orig/drivers/pcmcia/cs.c 2004-12-05 10:26:03.903010856 +0100
+++ 2.6.10-rc3/drivers/pcmcia/cs.c 2004-12-05 10:26:05.057835296 +0100
@@ -1147,37 +1147,6 @@
return CS_SUCCESS;
} /* modify_configuration */
-#ifdef CONFIG_PCMCIA_OBSOLETE
-
-/*======================================================================
-
- Modify the attributes of a window returned by RequestWindow.
-
-======================================================================*/
-
-int pcmcia_modify_window(window_handle_t win, modwin_t *req)
-{
- if ((win == NULL) || (win->magic != WINDOW_MAGIC))
- return CS_BAD_HANDLE;
-
- win->ctl.flags &= ~(MAP_ATTRIB|MAP_ACTIVE);
- if (req->Attributes & WIN_MEMORY_TYPE)
- win->ctl.flags |= MAP_ATTRIB;
- if (req->Attributes & WIN_ENABLE)
- win->ctl.flags |= MAP_ACTIVE;
- if (req->Attributes & WIN_DATA_WIDTH_16)
- win->ctl.flags |= MAP_16BIT;
- if (req->Attributes & WIN_USE_WAIT)
- win->ctl.flags |= MAP_USE_WAIT;
- win->ctl.speed = req->AccessSpeed;
- win->sock->ops->set_mem_map(win->sock, &win->ctl);
-
- return CS_SUCCESS;
-} /* modify_window */
-EXPORT_SYMBOL(pcmcia_modify_window);
-
-#endif /* CONFIG_PCMCIA_OBSOLETE */
-
/* register pcmcia_callback */
int pccard_register_pcmcia(struct pcmcia_socket *s, struct pcmcia_callback *c)
{
@@ -1865,35 +1834,6 @@
/*======================================================================
- Maybe this should send a CS_EVENT_CARD_INSERTION event if we
- haven't sent one to this client yet?
-
-======================================================================*/
-
-#ifdef CONFIG_PCMCIA_OBSOLETE
-int pcmcia_set_event_mask(client_handle_t handle, eventmask_t *mask)
-{
- u_int events, bit;
- if (CHECK_HANDLE(handle))
- return CS_BAD_HANDLE;
- if (handle->Attributes & CONF_EVENT_MASK_VALID)
- return CS_BAD_SOCKET;
- handle->EventMask = mask->EventMask;
- events = handle->PendingEvents & handle->EventMask;
- handle->PendingEvents -= events;
- while (events != 0) {
- bit = ((events ^ (events-1)) + 1) >> 1;
- EVENT(handle, bit, CS_EVENT_PRI_LOW);
- events -= bit;
- }
- return CS_SUCCESS;
-} /* set_event_mask */
-EXPORT_SYMBOL(pcmcia_set_event_mask);
-
-#endif /* CONFIG_PCMCIA_OBSOLETE */
-
-/*======================================================================
-
OS-specific module glue goes here
======================================================================*/
Index: 2.6.10-rc3/drivers/pcmcia/pcmcia_compat.c
===================================================================
--- 2.6.10-rc3.orig/drivers/pcmcia/pcmcia_compat.c 2004-12-05 10:24:14.427653640 +0100
+++ 2.6.10-rc3/drivers/pcmcia/pcmcia_compat.c 2004-12-05 10:26:05.058835144 +0100
@@ -123,23 +123,3 @@
}
EXPORT_SYMBOL(pcmcia_access_configuration_register);
-#ifdef CONFIG_PCMCIA_OBSOLETE
-
-int pcmcia_get_first_window(window_handle_t *win, win_req_t *req)
-{
- if ((win == NULL) || ((*win)->magic != WINDOW_MAGIC))
- return CS_BAD_HANDLE;
-
- return pcmcia_get_window(((client_handle_t)*win)->Socket, win, 0, req);
-}
-EXPORT_SYMBOL(pcmcia_get_first_window);
-
-int pcmcia_get_next_window(window_handle_t *win, win_req_t *req)
-{
- if ((win == NULL) || ((*win)->magic != WINDOW_MAGIC))
- return CS_BAD_HANDLE;
- return pcmcia_get_window((*win)->sock, win, (*win)->index+1, req);
-}
-EXPORT_SYMBOL(pcmcia_get_next_window);
-
-#endif
Index: 2.6.10-rc3/include/pcmcia/cs.h
===================================================================
--- 2.6.10-rc3.orig/include/pcmcia/cs.h 2004-12-05 10:26:01.539370184 +0100
+++ 2.6.10-rc3/include/pcmcia/cs.h 2004-12-05 10:26:05.059834992 +0100
@@ -419,13 +419,6 @@
int pcmcia_insert_card(struct pcmcia_socket *skt);
int pcmcia_report_error(client_handle_t handle, error_info_t *err);
-#ifdef CONFIG_PCMCIA_OBSOLETE
-int pcmcia_get_first_client(client_handle_t *handle, client_req_t *req);
-int pcmcia_get_next_client(client_handle_t *handle, client_req_t *req);
-int pcmcia_modify_window(window_handle_t win, modwin_t *req);
-int pcmcia_set_event_mask(client_handle_t handle, eventmask_t *mask);
-#endif
-
struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt);
void pcmcia_put_socket(struct pcmcia_socket *skt);
More information about the linux-pcmcia
mailing list