From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Al Viro <viro@ftp.linux.org.uk>,
linux-kernel@vger.kernel.org, jgarzik@pobox.com,
netdev@vger.kernel.org
Subject: [5/10] remove ISA legacy functions: drivers/net/hp-plus.c
Date: Thu, 26 Jan 2006 23:51:55 +0100 [thread overview]
Message-ID: <20060126225155.GI3668@stusta.de> (raw)
In-Reply-To: <20060126223126.GD3668@stusta.de>
From: Al Viro <viro@zeniv.linux.org.uk>
switch to ioremap()
Adrian Bunk:
The order of the hunks in the patch was slightly rearranged due to an
unrelated change in the driver.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/net/hp-plus.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
202702a915ccef02d54b57e39a4545e4f310ac76
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c
--- a/drivers/net/hp-plus.c
+++ b/drivers/net/hp-plus.c
@@ -256,6 +257,12 @@ static int __init hpp_probe1(struct net_
ei_status.block_output = &hpp_mem_block_output;
ei_status.get_8390_hdr = &hpp_mem_get_8390_hdr;
dev->mem_start = mem_start;
+ ei_status.mem = ioremap(mem_start,
+ (HP_STOP_PG - HP_START_PG)*256);
+ if (!ei_status.mem) {
+ retval = -ENOMEM;
+ goto out;
+ }
ei_status.rmem_start = dev->mem_start + TX_PAGES/2*256;
dev->mem_end = ei_status.rmem_end
= dev->mem_start + (HP_STOP_PG - HP_START_PG)*256;
@@ -268,8 +275,10 @@ static int __init hpp_probe1(struct net_
retval = register_netdev(dev);
if (retval)
- goto out;
+ goto out1;
return 0;
+out1:
+ iounmap(ei_status.mem);
out:
release_region(ioaddr, HP_IO_EXTENT);
return retval;
@@ -378,7 +387,7 @@ hpp_mem_get_8390_hdr(struct net_device *
outw((ring_page<<8), ioaddr + HPP_IN_ADDR);
outw(option_reg & ~(MemDisable + BootROMEnb), ioaddr + HPP_OPTION);
- isa_memcpy_fromio(hdr, dev->mem_start, sizeof(struct e8390_pkt_hdr));
+ memcpy_fromio(hdr, ei_status.mem, sizeof(struct e8390_pkt_hdr));
outw(option_reg, ioaddr + HPP_OPTION);
hdr->count = (le16_to_cpu(hdr->count) + 3) & ~3; /* Round up allocation. */
}
@@ -397,7 +406,7 @@ hpp_mem_block_input(struct net_device *d
Also note that we *can't* use eth_io_copy_and_sum() because
it will not always copy "count" bytes (e.g. padded IP). */
- isa_memcpy_fromio(skb->data, dev->mem_start, count);
+ memcpy_fromio(skb->data, ei_status.mem, count);
outw(option_reg, ioaddr + HPP_OPTION);
}
@@ -422,7 +431,7 @@ hpp_mem_block_output(struct net_device *
outw(start_page << 8, ioaddr + HPP_OUT_ADDR);
outw(option_reg & ~(MemDisable + BootROMEnb), ioaddr + HPP_OPTION);
- isa_memcpy_toio(dev->mem_start, buf, (count + 3) & ~3);
+ memcpy_toio(ei_status.mem, buf, (count + 3) & ~3);
outw(option_reg, ioaddr + HPP_OPTION);
return;
@@ -541,6 +541,7 @@ static int __init do_hpp_probe(struct ne
static void cleanup_card(struct net_device *dev)
{
/* NB: hpp_close() handles free_irq */
+ iounmap(ei_status.mem);
release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT);
}
next prev parent reply other threads:[~2006-01-26 22:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-26 22:31 [2.6 patch: 0/10] remove ISA legacy functions Adrian Bunk
2006-01-26 22:45 ` [1/10] remove ISA legacy functions: drivers/char/toshiba.c Adrian Bunk
2006-01-26 22:46 ` [2/10] remove ISA legacy functions: drivers/net/arcnet/ Adrian Bunk
2006-01-26 22:48 ` [3/10] remove ISA legacy functions: drivers/scsi/g_NCR5380.c Adrian Bunk
2006-01-26 22:49 ` [4/10] remove ISA legacy functions: drivers/scsi/in2000.c Adrian Bunk
2006-01-26 22:51 ` Adrian Bunk [this message]
2006-01-26 22:53 ` [6/10] remove ISA legacy functions: drivers/net/hp100.c Adrian Bunk
2006-01-26 22:54 ` [7/10] remove ISA legacy functions: drivers/net/lance.c Adrian Bunk
2006-01-26 22:56 ` [8/10] remove ISA legacy functions: remove the helpers Adrian Bunk
2006-01-26 22:57 ` [9/10] remove ISA legacy functions: remove documentation Adrian Bunk
2006-01-26 22:57 ` [10/10] remove ISA legacy functions: only 9 patches Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060126225155.GI3668@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).