Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jiri Slaby and committed by
Linus Torvalds
24e6fd4c 7aef709b

+12 -9
+12 -9
drivers/char/cyclades.c
··· 4993 4993 device_id == PCI_DEVICE_ID_CYCLOM_Y_Hi) { 4994 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 4998 if (addr0 == NULL) { 4998 4999 dev_err(&pdev->dev, "can't remap ctl region\n"); 4999 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 5004 if (addr2 == NULL) { 5003 5005 dev_err(&pdev->dev, "can't remap base region\n"); 5004 5006 goto err_unmap; ··· 5015 5013 } else if (device_id == PCI_DEVICE_ID_CYCLOM_Z_Hi) { 5016 5014 struct RUNTIME_9060 __iomem *ctl_addr; 5017 5015 5018 - ctl_addr = addr0 = pci_iomap(pdev, 0, CyPCI_Zctl); 5016 + ctl_addr = addr0 = ioremap_nocache(pci_resource_start(pdev, 0), 5017 + CyPCI_Zctl); 5019 5018 if (addr0 == NULL) { 5020 5019 dev_err(&pdev->dev, "can't remap ctl region\n"); 5021 5020 goto err_reg; ··· 5029 5026 5030 5027 mailbox = (u32)readl(&ctl_addr->mail_box_0); 5031 5028 5032 - addr2 = pci_iomap(pdev, 2, mailbox == ZE_V1 ? 5033 - CyPCI_Ze_win : CyPCI_Zwin); 5029 + addr2 = ioremap_nocache(pci_resource_start(pdev, 2), 5030 + mailbox == ZE_V1 ? CyPCI_Ze_win : CyPCI_Zwin); 5034 5031 if (addr2 == NULL) { 5035 5032 dev_err(&pdev->dev, "can't remap base region\n"); 5036 5033 goto err_unmap; ··· 5162 5159 cy_card[card_no].base_addr = NULL; 5163 5160 free_irq(irq, &cy_card[card_no]); 5164 5161 err_unmap: 5165 - pci_iounmap(pdev, addr0); 5162 + iounmap(addr0); 5166 5163 if (addr2) 5167 - pci_iounmap(pdev, addr2); 5164 + iounmap(addr2); 5168 5165 err_reg: 5169 5166 pci_release_regions(pdev); 5170 5167 err_dis: ··· 5189 5186 cy_writew(cinfo->ctl_addr + 0x68, 5190 5187 readw(cinfo->ctl_addr + 0x68) & ~0x0900); 5191 5188 5192 - pci_iounmap(pdev, cinfo->base_addr); 5189 + iounmap(cinfo->base_addr); 5193 5190 if (cinfo->ctl_addr) 5194 - pci_iounmap(pdev, cinfo->ctl_addr); 5191 + iounmap(cinfo->ctl_addr); 5195 5192 if (cinfo->irq 5196 5193 #ifndef CONFIG_CYZ_INTR 5197 5194 && !IS_CYC_Z(*cinfo)