diff options
author | Magnus Damm <damm@opensource.se> | 2006-12-13 05:46:53 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2009-11-28 12:02:50 -0500 |
commit | 0bdf9b3dd3cfa5cbd5d55172c19f5dd166208e17 (patch) | |
tree | a7af14eb0601a443343240cbb11d7693db9de352 /include/pcmcia | |
parent | 16456ebabfec3f8f509fc18b45f256d066a1b360 (diff) |
pcmcia: Change window_handle_t logic to unsigned long
Logic changes based on top of the other patches:
This set of patches changed window_handle_t from being a pointer to an
unsigned long. The unsigned long is now a simple index into socket->win[].
Going from a pointer to unsigned long should leave the user space interface
unchanged unless I'm mistaken.
This change results in code that is less error prone and a user space
interface which is much cleaner and safer. A nice side effect is that we
are also are able to remove all members except one from window_t.
[ linux@dominikbrodowski.net:
Update to 2.6.31. Also, a plain "index" to socket->win[] does not
work, as several codepaths rely on "window_handle_t" being
non-zero if used. Therefore, set the window_handle_t to the
socket->win[] index + 1. ]
CC: netdev@vger.kernel.org
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'include/pcmcia')
-rw-r--r-- | include/pcmcia/cs_types.h | 3 | ||||
-rw-r--r-- | include/pcmcia/ss.h | 5 |
2 files changed, 1 insertions, 7 deletions
diff --git a/include/pcmcia/cs_types.h b/include/pcmcia/cs_types.h index 315965a37930..f5e3b8386c8f 100644 --- a/include/pcmcia/cs_types.h +++ b/include/pcmcia/cs_types.h | |||
@@ -26,8 +26,7 @@ typedef u_int event_t; | |||
26 | typedef u_char cisdata_t; | 26 | typedef u_char cisdata_t; |
27 | typedef u_short page_t; | 27 | typedef u_short page_t; |
28 | 28 | ||
29 | struct window_t; | 29 | typedef unsigned long window_handle_t; |
30 | typedef struct window_t *window_handle_t; | ||
31 | 30 | ||
32 | struct region_t; | 31 | struct region_t; |
33 | typedef struct region_t *memory_handle_t; | 32 | typedef struct region_t *memory_handle_t; |
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 753da9b087d3..6301c3f4f19e 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h | |||
@@ -107,12 +107,7 @@ typedef struct io_window_t { | |||
107 | struct resource *res; | 107 | struct resource *res; |
108 | } io_window_t; | 108 | } io_window_t; |
109 | 109 | ||
110 | #define WINDOW_MAGIC 0xB35C | ||
111 | typedef struct window_t { | 110 | typedef struct window_t { |
112 | u_short magic; | ||
113 | u_short index; | ||
114 | struct pcmcia_device *handle; | ||
115 | struct pcmcia_socket *sock; | ||
116 | pccard_mem_map ctl; | 111 | pccard_mem_map ctl; |
117 | } window_t; | 112 | } window_t; |
118 | 113 | ||