pcmcia: remove unused "window_t" typedef

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
Dominik Brodowski 2009-11-03 01:16:12 +01:00
Родитель d7b0364bfc
Коммит 82f88e3600
3 изменённых файлов: 33 добавлений и 37 удалений

Просмотреть файл

@ -224,7 +224,7 @@ static int pcmcia_adjust_resource_info(adjust_t *adj)
static int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *wh_out,
window_handle_t wh, win_req_t *req)
{
window_t *win;
pccard_mem_map *win;
window_handle_t w;
wh--;
@ -238,17 +238,17 @@ static int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *wh_out,
if (w == MAX_WIN)
return -EINVAL;
win = &s->win[w];
req->Base = win->ctl.res->start;
req->Size = win->ctl.res->end - win->ctl.res->start + 1;
req->AccessSpeed = win->ctl.speed;
req->Base = win->res->start;
req->Size = win->res->end - win->res->start + 1;
req->AccessSpeed = win->speed;
req->Attributes = 0;
if (win->ctl.flags & MAP_ATTRIB)
if (win->flags & MAP_ATTRIB)
req->Attributes |= WIN_MEMORY_TYPE_AM;
if (win->ctl.flags & MAP_ACTIVE)
if (win->flags & MAP_ACTIVE)
req->Attributes |= WIN_ENABLE;
if (win->ctl.flags & MAP_16BIT)
if (win->flags & MAP_16BIT)
req->Attributes |= WIN_DATA_WIDTH_16;
if (win->ctl.flags & MAP_USE_WAIT)
if (win->flags & MAP_USE_WAIT)
req->Attributes |= WIN_USE_WAIT;
*wh_out = w + 1;
@ -268,7 +268,7 @@ static int pcmcia_get_mem_page(struct pcmcia_socket *skt, window_handle_t wh,
return -EINVAL;
req->Page = 0;
req->CardOffset = skt->win[wh].ctl.card_start;
req->CardOffset = skt->win[wh].card_start;
return 0;
} /* pcmcia_get_mem_page */

Просмотреть файл

@ -197,8 +197,8 @@ int pcmcia_map_mem_page(struct pcmcia_device *p_dev, window_handle_t wh,
dev_dbg(&s->dev, "failure: requested page is zero\n");
return -EINVAL;
}
s->win[wh].ctl.card_start = req->CardOffset;
if (s->ops->set_mem_map(s, &s->win[wh].ctl) != 0) {
s->win[wh].card_start = req->CardOffset;
if (s->ops->set_mem_map(s, &s->win[wh]) != 0) {
dev_dbg(&s->dev, "failed to set_mem_map\n");
return -EIO;
}
@ -398,7 +398,7 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t wh)
{
struct pcmcia_socket *s = p_dev->socket;
window_t *win;
pccard_mem_map *win;
wh--;
if (wh >= MAX_WIN)
@ -412,15 +412,15 @@ int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t wh)
}
/* Shut down memory window */
win->ctl.flags &= ~MAP_ACTIVE;
s->ops->set_mem_map(s, &win->ctl);
win->flags &= ~MAP_ACTIVE;
s->ops->set_mem_map(s, win);
s->state &= ~SOCKET_WIN_REQ(wh);
/* Release system memory */
if (win->ctl.res) {
release_resource(win->ctl.res);
kfree(win->ctl.res);
win->ctl.res = NULL;
if (win->res) {
release_resource(win->res);
kfree(win->res);
win->res = NULL;
}
p_dev->_win &= ~CLIENT_WIN_REQ(wh);
@ -755,7 +755,7 @@ EXPORT_SYMBOL(pcmcia_request_irq);
int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh)
{
struct pcmcia_socket *s = (*p_dev)->socket;
window_t *win;
pccard_mem_map *win;
u_long align;
int w;
@ -797,9 +797,9 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h
win = &s->win[w];
if (!(s->features & SS_CAP_STATIC_MAP)) {
win->ctl.res = pcmcia_find_mem_region(req->Base, req->Size, align,
win->res = pcmcia_find_mem_region(req->Base, req->Size, align,
(req->Attributes & WIN_MAP_BELOW_1MB), s);
if (!win->ctl.res) {
if (!win->res) {
dev_dbg(&s->dev, "allocating mem region failed\n");
return -EINVAL;
}
@ -807,19 +807,19 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h
(*p_dev)->_win |= CLIENT_WIN_REQ(w);
/* Configure the socket controller */
win->ctl.map = w+1;
win->ctl.flags = 0;
win->ctl.speed = req->AccessSpeed;
win->map = w+1;
win->flags = 0;
win->speed = req->AccessSpeed;
if (req->Attributes & WIN_MEMORY_TYPE)
win->ctl.flags |= MAP_ATTRIB;
win->flags |= MAP_ATTRIB;
if (req->Attributes & WIN_ENABLE)
win->ctl.flags |= MAP_ACTIVE;
win->flags |= MAP_ACTIVE;
if (req->Attributes & WIN_DATA_WIDTH_16)
win->ctl.flags |= MAP_16BIT;
win->flags |= MAP_16BIT;
if (req->Attributes & WIN_USE_WAIT)
win->ctl.flags |= MAP_USE_WAIT;
win->ctl.card_start = 0;
if (s->ops->set_mem_map(s, &win->ctl) != 0) {
win->flags |= MAP_USE_WAIT;
win->card_start = 0;
if (s->ops->set_mem_map(s, win) != 0) {
dev_dbg(&s->dev, "failed to set memory mapping\n");
return -EIO;
}
@ -827,9 +827,9 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h
/* Return window handle */
if (s->features & SS_CAP_STATIC_MAP) {
req->Base = win->ctl.static_start;
req->Base = win->static_start;
} else {
req->Base = win->ctl.res->start;
req->Base = win->res->start;
}
*wh = w + 1;

Просмотреть файл

@ -107,10 +107,6 @@ typedef struct io_window_t {
struct resource *res;
} io_window_t;
typedef struct window_t {
pccard_mem_map ctl;
} window_t;
/* Maximum number of IO windows per socket */
#define MAX_IO_WIN 2
@ -150,7 +146,7 @@ struct pcmcia_socket {
u_int Config;
} irq;
io_window_t io[MAX_IO_WIN];
window_t win[MAX_WIN];
pccard_mem_map win[MAX_WIN];
struct list_head cis_cache;
size_t fake_cis_len;
u8 *fake_cis;