You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Dominik Brodowski
parent
16456ebabf
commit
0bdf9b3dd3
@@ -26,8 +26,7 @@ typedef u_int event_t;
|
||||
typedef u_char cisdata_t;
|
||||
typedef u_short page_t;
|
||||
|
||||
struct window_t;
|
||||
typedef struct window_t *window_handle_t;
|
||||
typedef unsigned long window_handle_t;
|
||||
|
||||
struct region_t;
|
||||
typedef struct region_t *memory_handle_t;
|
||||
|
||||
@@ -107,12 +107,7 @@ typedef struct io_window_t {
|
||||
struct resource *res;
|
||||
} io_window_t;
|
||||
|
||||
#define WINDOW_MAGIC 0xB35C
|
||||
typedef struct window_t {
|
||||
u_short magic;
|
||||
u_short index;
|
||||
struct pcmcia_device *handle;
|
||||
struct pcmcia_socket *sock;
|
||||
pccard_mem_map ctl;
|
||||
} window_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user