[PATCH 07/13] pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page()

Dominik Brodowski linux at dominikbrodowski.net
Wed Nov 11 15:38:13 EST 2009


From: Magnus Damm <damm at opensource.se>

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

[linux at dominikbrodowski.net: update to 2.6.31]
Signed-off-by: Magnus Damm <damm at opensource.se>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/pcmcia/cs_internal.h     |    2 ++
 drivers/pcmcia/pcmcia_ioctl.c    |    2 +-
 drivers/pcmcia/pcmcia_resource.c |    5 ++++-
 include/pcmcia/ds.h              |    2 --
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h
index 0a3ada9..8e09a49 100644
--- a/drivers/pcmcia/cs_internal.h
+++ b/drivers/pcmcia/cs_internal.h
@@ -227,6 +227,8 @@ extern void pcmcia_put_dev(struct pcmcia_device *p_dev);
 
 struct pcmcia_device *pcmcia_device_add(struct pcmcia_socket *s,
 					unsigned int function);
+int pcmcia_get_mem_page(struct pcmcia_socket *skt, window_handle_t win,
+			memreq_t *req);
 
 /* pcmcia_ioctl.c */
 extern void __init pcmcia_setup_ioctl(void);
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index 056fd13..c829ead 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -924,7 +924,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
 			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:
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index b60952a..a092749 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -223,8 +223,11 @@ EXPORT_SYMBOL(pcmcia_get_window);
  *
  * 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 *skt, window_handle_t wh,
+			memreq_t *req)
 {
+	window_handle_t win = wh;
+
 	if ((win == NULL) || (win->magic != WINDOW_MAGIC))
 		return -EINVAL;
 	req->Page = 0;
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index f240bfa..cbf5f05 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -202,8 +202,6 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
 int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req,
 			  window_handle_t *wh);
 int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t win);
-
-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 win,
 			memreq_t *req);
 
-- 
1.6.0.4




More information about the linux-pcmcia mailing list