[PATCH 03/04] pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page()

Magnus Damm damm at opensource.se
Wed Dec 13 05:46:48 EST 2006


pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page()

No logic changes, just pass struct pcmcia_socket to pcmcia_get_mem_page()

Signed-off-by: Magnus Damm <damm at opensource.se>
---

 Applies to 2.6.19-git19

 drivers/pcmcia/cs_internal.h     |    1 +
 drivers/pcmcia/pcmcia_ioctl.c    |    2 +-
 drivers/pcmcia/pcmcia_resource.c |    5 ++++-
 include/pcmcia/cs.h              |    1 -
 4 files changed, 6 insertions(+), 3 deletions(-)

--- 0005/drivers/pcmcia/cs_internal.h
+++ work/drivers/pcmcia/cs_internal.h	2006-12-13 13:15:19.000000000 +0900
@@ -115,6 +115,7 @@ extern struct class_interface pccard_sys
 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 pcmcia_get_mem_page(struct pcmcia_socket *s, window_handle_t wh, memreq_t *req);
 int pccard_get_configuration_info(struct pcmcia_socket *s, struct pcmcia_device *p_dev, config_info_t *config);
 int pccard_reset_card(struct pcmcia_socket *skt);
 int pccard_get_status(struct pcmcia_socket *s, struct pcmcia_device *p_dev, cs_status_t *status);
--- 0005/drivers/pcmcia/pcmcia_ioctl.c
+++ work/drivers/pcmcia/pcmcia_ioctl.c	2006-12-13 13:15:19.000000000 +0900
@@ -690,7 +690,7 @@ static int ds_ioctl(struct inode * inode
 			buf->win_info.handle->index + 1, &buf->win_info.window);
 	break;
     case DS_GET_MEM_PAGE:
-	ret = pcmcia_get_mem_page(buf->win_info.handle,
+	ret = pcmcia_get_mem_page(s, buf->win_info.handle,
 			   &buf->win_info.map);
 	break;
     case DS_REPLACE_CIS:
--- 0007/drivers/pcmcia/pcmcia_resource.c
+++ work/drivers/pcmcia/pcmcia_resource.c	2006-12-13 13:15:37.000000000 +0900
@@ -383,8 +383,11 @@ EXPORT_SYMBOL(pcmcia_get_status);
  *
  * Change the card address of an already open memory window.
  */
-int pcmcia_get_mem_page(window_handle_t win, memreq_t *req)
+int pcmcia_get_mem_page(struct pcmcia_socket *s, 
+			window_handle_t wh, memreq_t *req)
 {
+	window_handle_t win = wh;
+
 	if ((win == NULL) || (win->magic != WINDOW_MAGIC))
 		return CS_BAD_HANDLE;
 	req->Page = 0;
--- 0007/include/pcmcia/cs.h
+++ work/include/pcmcia/cs.h	2006-12-13 13:15:19.000000000 +0900
@@ -374,7 +374,6 @@ struct pcmcia_socket;
 int pcmcia_access_configuration_register(struct pcmcia_device *p_dev, conf_reg_t *reg);
 int pcmcia_get_configuration_info(struct pcmcia_device *p_dev, config_info_t *config);
 int pcmcia_get_status(struct pcmcia_device *p_dev, cs_status_t *status);
-int pcmcia_get_mem_page(window_handle_t win, memreq_t *req);
 int pcmcia_map_mem_page(struct pcmcia_device *p_dev, window_handle_t wh, memreq_t *req);
 int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod);
 int pcmcia_request_configuration(struct pcmcia_device *p_dev, config_req_t *req);



More information about the linux-pcmcia mailing list