Commit 7bd760e6 authored by Dominik Brodowski's avatar Dominik Brodowski Committed by Russell King

[PCMCIA] 12-reset_card.diff

pcmcia_reset_card doesn't need to know about the handle, but add a
wrapper for backwards compatibility anyways.
parent b2fac47f
......@@ -1885,14 +1885,10 @@ int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle
======================================================================*/
int pcmcia_reset_card(client_handle_t handle, client_req_t *req)
int pccard_reset_card(struct pcmcia_socket *skt)
{
struct pcmcia_socket *skt;
int ret;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
skt = SOCKET(handle);
cs_dbg(skt, 1, "resetting socket\n");
down(&skt->skt_sem);
......@@ -1917,15 +1913,13 @@ int pcmcia_reset_card(client_handle_t handle, client_req_t *req)
send_event(skt, CS_EVENT_CARD_RESET, CS_EVENT_PRI_LOW);
}
handle->event_callback_args.info = (void *)(u_long)ret;
EVENT(handle, CS_EVENT_RESET_COMPLETE, CS_EVENT_PRI_LOW);
ret = CS_SUCCESS;
} while (0);
up(&skt->skt_sem);
return ret;
} /* reset_card */
EXPORT_SYMBOL(pccard_reset_card);
/*======================================================================
......@@ -2090,7 +2084,6 @@ EXPORT_SYMBOL(pcmcia_request_configuration);
EXPORT_SYMBOL(pcmcia_request_io);
EXPORT_SYMBOL(pcmcia_request_irq);
EXPORT_SYMBOL(pcmcia_request_window);
EXPORT_SYMBOL(pcmcia_reset_card);
EXPORT_SYMBOL(pcmcia_resume_card);
EXPORT_SYMBOL(pcmcia_suspend_card);
......
......@@ -173,6 +173,7 @@ extern struct rw_semaphore pcmcia_socket_list_rwsem;
extern struct list_head pcmcia_socket_list;
int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *handle, int idx, win_req_t *req);
int pccard_get_configuration_info(struct pcmcia_socket *s, unsigned int function, config_info_t *config);
int pccard_reset_card(struct pcmcia_socket *skt);
#define cs_socket_name(skt) ((skt)->dev.class_id)
......
......@@ -963,7 +963,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
ret = pccard_parse_tuple(&buf.tuple, &buf.tuple_parse.parse);
break;
case DS_RESET_CARD:
ret = pcmcia_reset_card(s->handle, NULL);
ret = pccard_reset_card(s->parent);
break;
case DS_GET_STATUS:
ret = pcmcia_get_status(s->handle, &buf.status);
......
......@@ -88,6 +88,20 @@ int pcmcia_get_configuration_info(client_handle_t handle,
}
EXPORT_SYMBOL(pcmcia_get_configuration_info);
int pcmcia_reset_card(client_handle_t handle, client_req_t *req)
{
struct pcmcia_socket *skt;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
skt = SOCKET(handle);
if (!skt)
return CS_BAD_HANDLE;
return pccard_reset_card(skt);
}
EXPORT_SYMBOL(pcmcia_reset_card);
#ifdef CONFIG_PCMCIA_OBSOLETE
int pcmcia_get_first_window(window_handle_t *win, win_req_t *req)
......
......@@ -348,7 +348,6 @@ typedef struct mtd_bind_t {
#define CS_EVENT_RESET_PHYSICAL 0x000200
#define CS_EVENT_CARD_RESET 0x000400
#define CS_EVENT_REGISTRATION_COMPLETE 0x000800
#define CS_EVENT_RESET_COMPLETE 0x001000
#define CS_EVENT_PM_SUSPEND 0x002000
#define CS_EVENT_PM_RESUME 0x004000
#define CS_EVENT_INSERTION_REQUEST 0x008000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment