Commit a99a281c authored by Russell King's avatar Russell King

[PCMCIA] 03-memwin

Eliminate win->base and win->size elements from window_t.
window_t contains struct pccard_mem_map, which contains a
copy of these (sys_start, sys_stop) in a slightly different
form.
parent 153fef7f
......@@ -1549,7 +1549,7 @@ int pcmcia_release_window(window_handle_t win)
/* Release system memory */
if(!(s->features & SS_CAP_STATIC_MAP))
release_mem_region(win->base, win->size);
release_mem_region(win->ctl.sys_start, win->ctl.sys_stop - win->ctl.sys_start + 1);
win->handle->state &= ~CLIENT_WIN_REQ(win->index);
win->magic = 0;
......@@ -1871,14 +1871,14 @@ int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle
win->index = w;
win->handle = *handle;
win->sock = s;
win->base = req->Base;
win->size = req->Size;
win->ctl.sys_start = req->Base;
if (!(s->features & SS_CAP_STATIC_MAP) &&
find_mem_region(&win->base, win->size, align,
find_mem_region(&win->ctl.sys_start, req->Size, align,
(req->Attributes & WIN_MAP_BELOW_1MB),
(*handle)->dev_info, s))
return CS_IN_USE;
win->ctl.sys_stop = win->ctl.sys_start + req->Size - 1;
(*handle)->state |= CLIENT_WIN_REQ(w);
/* Configure the socket controller */
......@@ -1893,8 +1893,6 @@ int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle
win->ctl.flags |= MAP_16BIT;
if (req->Attributes & WIN_USE_WAIT)
win->ctl.flags |= MAP_USE_WAIT;
win->ctl.sys_start = win->base;
win->ctl.sys_stop = win->base + win->size-1;
win->ctl.card_start = 0;
if (s->ops->set_mem_map(s, &win->ctl) != 0)
return CS_BAD_ARGS;
......
......@@ -154,8 +154,6 @@ typedef struct window_t {
u_short index;
client_handle_t handle;
struct pcmcia_socket *sock;
u_long base;
u_long size;
pccard_mem_map ctl;
} window_t;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment