aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2009-11-02 19:16:12 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2009-11-28 12:02:52 -0500
commit82f88e36004162f49a9340ffbbaebe89016e4835 (patch)
tree4e836607c66a1fec6a404617e1ea3066a9ef944a /drivers/pcmcia
parentd7b0364bfc71c4abc97dfc47f85bb32363266e4e (diff)
pcmcia: remove unused "window_t" typedef
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/pcmcia_ioctl.c18
-rw-r--r--drivers/pcmcia/pcmcia_resource.c46
2 files changed, 32 insertions, 32 deletions
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index 38b3a26a3ff3..c4d7908fa37f 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -224,7 +224,7 @@ static int pcmcia_adjust_resource_info(adjust_t *adj)
224static int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *wh_out, 224static int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *wh_out,
225 window_handle_t wh, win_req_t *req) 225 window_handle_t wh, win_req_t *req)
226{ 226{
227 window_t *win; 227 pccard_mem_map *win;
228 window_handle_t w; 228 window_handle_t w;
229 229
230 wh--; 230 wh--;
@@ -238,17 +238,17 @@ static int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *wh_out,
238 if (w == MAX_WIN) 238 if (w == MAX_WIN)
239 return -EINVAL; 239 return -EINVAL;
240 win = &s->win[w]; 240 win = &s->win[w];
241 req->Base = win->ctl.res->start; 241 req->Base = win->res->start;
242 req->Size = win->ctl.res->end - win->ctl.res->start + 1; 242 req->Size = win->res->end - win->res->start + 1;
243 req->AccessSpeed = win->ctl.speed; 243 req->AccessSpeed = win->speed;
244 req->Attributes = 0; 244 req->Attributes = 0;
245 if (win->ctl.flags & MAP_ATTRIB) 245 if (win->flags & MAP_ATTRIB)
246 req->Attributes |= WIN_MEMORY_TYPE_AM; 246 req->Attributes |= WIN_MEMORY_TYPE_AM;
247 if (win->ctl.flags & MAP_ACTIVE) 247 if (win->flags & MAP_ACTIVE)
248 req->Attributes |= WIN_ENABLE; 248 req->Attributes |= WIN_ENABLE;
249 if (win->ctl.flags & MAP_16BIT) 249 if (win->flags & MAP_16BIT)
250 req->Attributes |= WIN_DATA_WIDTH_16; 250 req->Attributes |= WIN_DATA_WIDTH_16;
251 if (win->ctl.flags & MAP_USE_WAIT) 251 if (win->flags & MAP_USE_WAIT)
252 req->Attributes |= WIN_USE_WAIT; 252 req->Attributes |= WIN_USE_WAIT;
253 253
254 *wh_out = w + 1; 254 *wh_out = w + 1;
@@ -268,7 +268,7 @@ static int pcmcia_get_mem_page(struct pcmcia_socket *skt, window_handle_t wh,
268 return -EINVAL; 268 return -EINVAL;
269 269
270 req->Page = 0; 270 req->Page = 0;
271 req->CardOffset = skt->win[wh].ctl.card_start; 271 req->CardOffset = skt->win[wh].card_start;
272 return 0; 272 return 0;
273} /* pcmcia_get_mem_page */ 273} /* pcmcia_get_mem_page */
274 274
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)
398int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t wh) 398int 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);
755int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh) 755int 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