diff options
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index ae68b26a7050..50468543d607 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -197,8 +197,8 @@ int pcmcia_map_mem_page(struct pcmcia_device *p_dev, window_handle_t wh, | |||
197 | dev_dbg(&s->dev, "failure: requested page is zero\n"); | 197 | dev_dbg(&s->dev, "failure: requested page is zero\n"); |
198 | return -EINVAL; | 198 | return -EINVAL; |
199 | } | 199 | } |
200 | s->win[wh].ctl.card_start = req->CardOffset; | 200 | s->win[wh].card_start = req->CardOffset; |
201 | if (s->ops->set_mem_map(s, &s->win[wh].ctl) != 0) { | 201 | if (s->ops->set_mem_map(s, &s->win[wh]) != 0) { |
202 | dev_dbg(&s->dev, "failed to set_mem_map\n"); | 202 | dev_dbg(&s->dev, "failed to set_mem_map\n"); |
203 | return -EIO; | 203 | return -EIO; |
204 | } | 204 | } |
@@ -398,7 +398,7 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
398 | int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t wh) | 398 | int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t wh) |
399 | { | 399 | { |
400 | struct pcmcia_socket *s = p_dev->socket; | 400 | struct pcmcia_socket *s = p_dev->socket; |
401 | window_t *win; | 401 | pccard_mem_map *win; |
402 | 402 | ||
403 | wh--; | 403 | wh--; |
404 | if (wh >= MAX_WIN) | 404 | if (wh >= MAX_WIN) |
@@ -412,15 +412,15 @@ int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t wh) | |||
412 | } | 412 | } |
413 | 413 | ||
414 | /* Shut down memory window */ | 414 | /* Shut down memory window */ |
415 | win->ctl.flags &= ~MAP_ACTIVE; | 415 | win->flags &= ~MAP_ACTIVE; |
416 | s->ops->set_mem_map(s, &win->ctl); | 416 | s->ops->set_mem_map(s, win); |
417 | s->state &= ~SOCKET_WIN_REQ(wh); | 417 | s->state &= ~SOCKET_WIN_REQ(wh); |
418 | 418 | ||
419 | /* Release system memory */ | 419 | /* Release system memory */ |
420 | if (win->ctl.res) { | 420 | if (win->res) { |
421 | release_resource(win->ctl.res); | 421 | release_resource(win->res); |
422 | kfree(win->ctl.res); | 422 | kfree(win->res); |
423 | win->ctl.res = NULL; | 423 | win->res = NULL; |
424 | } | 424 | } |
425 | p_dev->_win &= ~CLIENT_WIN_REQ(wh); | 425 | p_dev->_win &= ~CLIENT_WIN_REQ(wh); |
426 | 426 | ||
@@ -755,7 +755,7 @@ EXPORT_SYMBOL(pcmcia_request_irq); | |||
755 | int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh) | 755 | int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh) |
756 | { | 756 | { |
757 | struct pcmcia_socket *s = (*p_dev)->socket; | 757 | struct pcmcia_socket *s = (*p_dev)->socket; |
758 | window_t *win; | 758 | pccard_mem_map *win; |
759 | u_long align; | 759 | u_long align; |
760 | int w; | 760 | int w; |
761 | 761 | ||
@@ -797,9 +797,9 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h | |||
797 | win = &s->win[w]; | 797 | win = &s->win[w]; |
798 | 798 | ||
799 | if (!(s->features & SS_CAP_STATIC_MAP)) { | 799 | if (!(s->features & SS_CAP_STATIC_MAP)) { |
800 | win->ctl.res = pcmcia_find_mem_region(req->Base, req->Size, align, | 800 | win->res = pcmcia_find_mem_region(req->Base, req->Size, align, |
801 | (req->Attributes & WIN_MAP_BELOW_1MB), s); | 801 | (req->Attributes & WIN_MAP_BELOW_1MB), s); |
802 | if (!win->ctl.res) { | 802 | if (!win->res) { |
803 | dev_dbg(&s->dev, "allocating mem region failed\n"); | 803 | dev_dbg(&s->dev, "allocating mem region failed\n"); |
804 | return -EINVAL; | 804 | return -EINVAL; |
805 | } | 805 | } |
@@ -807,19 +807,19 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h | |||
807 | (*p_dev)->_win |= CLIENT_WIN_REQ(w); | 807 | (*p_dev)->_win |= CLIENT_WIN_REQ(w); |
808 | 808 | ||
809 | /* Configure the socket controller */ | 809 | /* Configure the socket controller */ |
810 | win->ctl.map = w+1; | 810 | win->map = w+1; |
811 | win->ctl.flags = 0; | 811 | win->flags = 0; |
812 | win->ctl.speed = req->AccessSpeed; | 812 | win->speed = req->AccessSpeed; |
813 | if (req->Attributes & WIN_MEMORY_TYPE) | 813 | if (req->Attributes & WIN_MEMORY_TYPE) |
814 | win->ctl.flags |= MAP_ATTRIB; | 814 | win->flags |= MAP_ATTRIB; |
815 | if (req->Attributes & WIN_ENABLE) | 815 | if (req->Attributes & WIN_ENABLE) |
816 | win->ctl.flags |= MAP_ACTIVE; | 816 | win->flags |= MAP_ACTIVE; |
817 | if (req->Attributes & WIN_DATA_WIDTH_16) | 817 | if (req->Attributes & WIN_DATA_WIDTH_16) |
818 | win->ctl.flags |= MAP_16BIT; | 818 | win->flags |= MAP_16BIT; |
819 | if (req->Attributes & WIN_USE_WAIT) | 819 | if (req->Attributes & WIN_USE_WAIT) |
820 | win->ctl.flags |= MAP_USE_WAIT; | 820 | win->flags |= MAP_USE_WAIT; |
821 | win->ctl.card_start = 0; | 821 | win->card_start = 0; |
822 | if (s->ops->set_mem_map(s, &win->ctl) != 0) { | 822 | if (s->ops->set_mem_map(s, win) != 0) { |
823 | dev_dbg(&s->dev, "failed to set memory mapping\n"); | 823 | dev_dbg(&s->dev, "failed to set memory mapping\n"); |
824 | return -EIO; | 824 | return -EIO; |
825 | } | 825 | } |
@@ -827,9 +827,9 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h | |||
827 | 827 | ||
828 | /* Return window handle */ | 828 | /* Return window handle */ |
829 | if (s->features & SS_CAP_STATIC_MAP) { | 829 | if (s->features & SS_CAP_STATIC_MAP) { |
830 | req->Base = win->ctl.static_start; | 830 | req->Base = win->static_start; |
831 | } else { | 831 | } else { |
832 | req->Base = win->ctl.res->start; | 832 | req->Base = win->res->start; |
833 | } | 833 | } |
834 | *wh = w + 1; | 834 | *wh = w + 1; |
835 | 835 | ||