diff options
author | Gertjan van Wingerde <gwingerde@gmail.com> | 2010-11-13 19:11:22 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-17 16:18:54 -0500 |
commit | ef8397cfb3a385bc57a32213d0e4a5b7903a9dc6 (patch) | |
tree | fc46f30bee727fc65f89a02ecf4539d79618070a /drivers/net/wireless/rt2x00/rt2x00soc.c | |
parent | 72c7296e03e381b49958809915105b18b09fa7a3 (diff) | |
download | kernel_samsung_smdk4412-ef8397cfb3a385bc57a32213d0e4a5b7903a9dc6.tar.gz kernel_samsung_smdk4412-ef8397cfb3a385bc57a32213d0e4a5b7903a9dc6.tar.bz2 kernel_samsung_smdk4412-ef8397cfb3a385bc57a32213d0e4a5b7903a9dc6.zip |
rt2x00: Use ioremap for SoC devices instead of KSEG1ADDR.
Make the code a bit more portable to architectures that do not support
KSEG1ADDR.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Tested-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00soc.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00soc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00soc.c b/drivers/net/wireless/rt2x00/rt2x00soc.c index fc98063de71..2aa5c38022f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00soc.c +++ b/drivers/net/wireless/rt2x00/rt2x00soc.c @@ -40,6 +40,8 @@ static void rt2x00soc_free_reg(struct rt2x00_dev *rt2x00dev) kfree(rt2x00dev->eeprom); rt2x00dev->eeprom = NULL; + + iounmap(rt2x00dev->csr.base); } static int rt2x00soc_alloc_reg(struct rt2x00_dev *rt2x00dev) @@ -51,9 +53,9 @@ static int rt2x00soc_alloc_reg(struct rt2x00_dev *rt2x00dev) if (!res) return -ENODEV; - rt2x00dev->csr.base = (void __iomem *)KSEG1ADDR(res->start); + rt2x00dev->csr.base = ioremap(res->start, resource_size(res)); if (!rt2x00dev->csr.base) - goto exit; + return -ENOMEM; rt2x00dev->eeprom = kzalloc(rt2x00dev->ops->eeprom_size, GFP_KERNEL); if (!rt2x00dev->eeprom) |