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 /drivers/pcmcia/pcmcia_ioctl.c | |
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 'drivers/pcmcia/pcmcia_ioctl.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index c829ead5cdb7..6245fde02b79 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c | |||
@@ -916,12 +916,12 @@ static int ds_ioctl(struct inode * inode, struct file * file, | |||
916 | goto free_out; | 916 | goto free_out; |
917 | break; | 917 | break; |
918 | case DS_GET_FIRST_WINDOW: | 918 | case DS_GET_FIRST_WINDOW: |
919 | ret = pcmcia_get_window(s, &buf->win_info.handle, 0, | 919 | ret = pcmcia_get_window(s, &buf->win_info.handle, 1, |
920 | &buf->win_info.window); | 920 | &buf->win_info.window); |
921 | break; | 921 | break; |
922 | case DS_GET_NEXT_WINDOW: | 922 | case DS_GET_NEXT_WINDOW: |
923 | ret = pcmcia_get_window(s, &buf->win_info.handle, | 923 | ret = pcmcia_get_window(s, &buf->win_info.handle, |
924 | buf->win_info.handle->index + 1, &buf->win_info.window); | 924 | buf->win_info.handle + 1, &buf->win_info.window); |
925 | break; | 925 | break; |
926 | case DS_GET_MEM_PAGE: | 926 | case DS_GET_MEM_PAGE: |
927 | ret = pcmcia_get_mem_page(s, buf->win_info.handle, | 927 | ret = pcmcia_get_mem_page(s, buf->win_info.handle, |