aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-10-13 05:34:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 12:51:38 -0400
commit24e6fd4cdc841176ca3713fddc9a02bd128b1191 (patch)
tree381cb04a4c12bb550c8e5a0e99a5f732e526eb6a
parent7aef709bf6f7a0886ee044960a7a86ea76dc6e2b (diff)
Char: cyclades. remove bogus iomap
readl/writel are not expected to accept iomap return value. Replace bogus mapping by standard ioremap. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/char/cyclades.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index fe6d774fe2e4..5e5b1dc1a0a7 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -4993,12 +4993,14 @@ static int __devinit cy_pci_probe(struct pci_dev *pdev,
4993 device_id == PCI_DEVICE_ID_CYCLOM_Y_Hi) { 4993 device_id == PCI_DEVICE_ID_CYCLOM_Y_Hi) {
4994 card_name = "Cyclom-Y"; 4994 card_name = "Cyclom-Y";
4995 4995
4996 addr0 = pci_iomap(pdev, 0, CyPCI_Yctl); 4996 addr0 = ioremap_nocache(pci_resource_start(pdev, 0),
4997 CyPCI_Yctl);
4997 if (addr0 == NULL) { 4998 if (addr0 == NULL) {
4998 dev_err(&pdev->dev, "can't remap ctl region\n"); 4999 dev_err(&pdev->dev, "can't remap ctl region\n");
4999 goto err_reg; 5000 goto err_reg;
5000 } 5001 }
5001 addr2 = pci_iomap(pdev, 2, CyPCI_Ywin); 5002 addr2 = ioremap_nocache(pci_resource_start(pdev, 2),
5003 CyPCI_Ywin);
5002 if (addr2 == NULL) { 5004 if (addr2 == NULL) {
5003 dev_err(&pdev->dev, "can't remap base region\n"); 5005 dev_err(&pdev->dev, "can't remap base region\n");
5004 goto err_unmap; 5006 goto err_unmap;
@@ -5013,7 +5015,8 @@ static int __devinit cy_pci_probe(struct pci_dev *pdev,
5013 } else if (device_id == PCI_DEVICE_ID_CYCLOM_Z_Hi) { 5015 } else if (device_id == PCI_DEVICE_ID_CYCLOM_Z_Hi) {
5014 struct RUNTIME_9060 __iomem *ctl_addr; 5016 struct RUNTIME_9060 __iomem *ctl_addr;
5015 5017
5016 ctl_addr = addr0 = pci_iomap(pdev, 0, CyPCI_Zctl); 5018 ctl_addr = addr0 = ioremap_nocache(pci_resource_start(pdev, 0),
5019 CyPCI_Zctl);
5017 if (addr0 == NULL) { 5020 if (addr0 == NULL) {
5018 dev_err(&pdev->dev, "can't remap ctl region\n"); 5021 dev_err(&pdev->dev, "can't remap ctl region\n");
5019 goto err_reg; 5022 goto err_reg;
@@ -5026,8 +5029,8 @@ static int __devinit cy_pci_probe(struct pci_dev *pdev,
5026 5029
5027 mailbox = (u32)readl(&ctl_addr->mail_box_0); 5030 mailbox = (u32)readl(&ctl_addr->mail_box_0);
5028 5031
5029 addr2 = pci_iomap(pdev, 2, mailbox == ZE_V1 ? 5032 addr2 = ioremap_nocache(pci_resource_start(pdev, 2),
5030 CyPCI_Ze_win : CyPCI_Zwin); 5033 mailbox == ZE_V1 ? CyPCI_Ze_win : CyPCI_Zwin);
5031 if (addr2 == NULL) { 5034 if (addr2 == NULL) {
5032 dev_err(&pdev->dev, "can't remap base region\n"); 5035 dev_err(&pdev->dev, "can't remap base region\n");
5033 goto err_unmap; 5036 goto err_unmap;
@@ -5159,9 +5162,9 @@ err_null:
5159 cy_card[card_no].base_addr = NULL; 5162 cy_card[card_no].base_addr = NULL;
5160 free_irq(irq, &cy_card[card_no]); 5163 free_irq(irq, &cy_card[card_no]);
5161err_unmap: 5164err_unmap:
5162 pci_iounmap(pdev, addr0); 5165 iounmap(addr0);
5163 if (addr2) 5166 if (addr2)
5164 pci_iounmap(pdev, addr2); 5167 iounmap(addr2);
5165err_reg: 5168err_reg:
5166 pci_release_regions(pdev); 5169 pci_release_regions(pdev);
5167err_dis: 5170err_dis:
@@ -5186,9 +5189,9 @@ static void __devexit cy_pci_remove(struct pci_dev *pdev)
5186 cy_writew(cinfo->ctl_addr + 0x68, 5189 cy_writew(cinfo->ctl_addr + 0x68,
5187 readw(cinfo->ctl_addr + 0x68) & ~0x0900); 5190 readw(cinfo->ctl_addr + 0x68) & ~0x0900);
5188 5191
5189 pci_iounmap(pdev, cinfo->base_addr); 5192 iounmap(cinfo->base_addr);
5190 if (cinfo->ctl_addr) 5193 if (cinfo->ctl_addr)
5191 pci_iounmap(pdev, cinfo->ctl_addr); 5194 iounmap(cinfo->ctl_addr);
5192 if (cinfo->irq 5195 if (cinfo->irq
5193#ifndef CONFIG_CYZ_INTR 5196#ifndef CONFIG_CYZ_INTR
5194 && !IS_CYC_Z(*cinfo) 5197 && !IS_CYC_Z(*cinfo)