diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-24 12:46:42 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-08-03 03:04:14 -0400 |
commit | b5cb259e7fac5536c4ddf350af6a3d6cc950e47e (patch) | |
tree | fd752edd9a19ad9592fdabc87465ba17019465f6 /drivers/net/pcmcia/pcnet_cs.c | |
parent | a3d0d4d8dd45779b6e174a8567ffb9b485e472af (diff) |
pcmcia: remove memreq_t
Page already had to be set to 0; Offset can easily be passed as
parameter to pcmcia_map_mem_page.
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-ide@vger.kernel.org
CC: linux-usb@vger.kernel.org
CC: laforge@gnumonks.org
CC: linux-mtd@lists.infradead.org
CC: linux-bluetooth@vger.kernel.org
CC: alsa-devel@alsa-project.org
CC: linux-serial@vger.kernel.org
CC: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/pcmcia/pcnet_cs.c')
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 9c5fc9dfc55d..c3edfe4c2651 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -301,7 +301,6 @@ static hw_info_t *get_hwinfo(struct pcmcia_device *link) | |||
301 | { | 301 | { |
302 | struct net_device *dev = link->priv; | 302 | struct net_device *dev = link->priv; |
303 | win_req_t req; | 303 | win_req_t req; |
304 | memreq_t mem; | ||
305 | u_char __iomem *base, *virt; | 304 | u_char __iomem *base, *virt; |
306 | int i, j; | 305 | int i, j; |
307 | 306 | ||
@@ -314,10 +313,8 @@ static hw_info_t *get_hwinfo(struct pcmcia_device *link) | |||
314 | return NULL; | 313 | return NULL; |
315 | 314 | ||
316 | virt = ioremap(req.Base, req.Size); | 315 | virt = ioremap(req.Base, req.Size); |
317 | mem.Page = 0; | ||
318 | for (i = 0; i < NR_INFO; i++) { | 316 | for (i = 0; i < NR_INFO; i++) { |
319 | mem.CardOffset = hw_info[i].offset & ~(req.Size-1); | 317 | pcmcia_map_mem_page(link, link->win, hw_info[i].offset & ~(req.Size-1)); |
320 | pcmcia_map_mem_page(link, link->win, &mem); | ||
321 | base = &virt[hw_info[i].offset & (req.Size-1)]; | 318 | base = &virt[hw_info[i].offset & (req.Size-1)]; |
322 | if ((readb(base+0) == hw_info[i].a0) && | 319 | if ((readb(base+0) == hw_info[i].a0) && |
323 | (readb(base+2) == hw_info[i].a1) && | 320 | (readb(base+2) == hw_info[i].a1) && |
@@ -1463,7 +1460,6 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg, | |||
1463 | struct net_device *dev = link->priv; | 1460 | struct net_device *dev = link->priv; |
1464 | pcnet_dev_t *info = PRIV(dev); | 1461 | pcnet_dev_t *info = PRIV(dev); |
1465 | win_req_t req; | 1462 | win_req_t req; |
1466 | memreq_t mem; | ||
1467 | int i, window_size, offset, ret; | 1463 | int i, window_size, offset, ret; |
1468 | 1464 | ||
1469 | window_size = (stop_pg - start_pg) << 8; | 1465 | window_size = (stop_pg - start_pg) << 8; |
@@ -1482,11 +1478,9 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg, | |||
1482 | if (ret) | 1478 | if (ret) |
1483 | goto failed; | 1479 | goto failed; |
1484 | 1480 | ||
1485 | mem.CardOffset = (start_pg << 8) + cm_offset; | 1481 | offset = (start_pg << 8) + cm_offset; |
1486 | offset = mem.CardOffset % window_size; | 1482 | offset -= offset % window_size; |
1487 | mem.CardOffset -= offset; | 1483 | ret = pcmcia_map_mem_page(link, link->win, offset); |
1488 | mem.Page = 0; | ||
1489 | ret = pcmcia_map_mem_page(link, link->win, &mem); | ||
1490 | if (ret) | 1484 | if (ret) |
1491 | goto failed; | 1485 | goto failed; |
1492 | 1486 | ||