Re: [PATCH] pci: use pci_ioremap_bar() in drivers/ide

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I just wrote:

diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index 9ce1d80..b4be295 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c

[...]

@@ -557,10 +553,12 @@ static int setup_mmio_scc (struct pci_dev *dev, const char *name)
         return ret;
     }
- if ((ctl_addr = ioremap(ctl_base, ctl_size)) == NULL)
+    ctl_addr = pci_ioremap_bar(dev, 0);
+    if (!ctl_addr)
         goto fail_0;
- if ((dma_addr = ioremap(dma_base, dma_size)) == NULL)
+    dma_addr = pci_ioremap_bar(dev, 1);
+    if (!dma_addr)
         goto fail_1;
pci_set_master(dev);

   An added bonus here is fixing couple checkpatch.pl's warnings.

   Wait, those even were errors, so even better. :-)

MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux