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

pci: use pci_ioremap_bar() in drivers/misc

Use the newly introduced pci_ioremap_bar() function in drivers/misc.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Arjan van de Ven and committed by
Linus Torvalds
bdbeed75 ea435467

+2 -4
+1 -2
drivers/misc/ibmasm/module.c
··· 104 104 } 105 105 106 106 sp->irq = pdev->irq; 107 - sp->base_address = ioremap(pci_resource_start(pdev, 0), 108 - pci_resource_len(pdev, 0)); 107 + sp->base_address = pci_ioremap_bar(pdev, 0); 109 108 if (!sp->base_address) { 110 109 dev_err(sp->dev, "Failed to ioremap pci memory\n"); 111 110 result = -ENODEV;
+1 -2
drivers/misc/tifm_7xx1.c
··· 354 354 fm->has_ms_pif = tifm_7xx1_has_ms_pif; 355 355 pci_set_drvdata(dev, fm); 356 356 357 - fm->addr = ioremap(pci_resource_start(dev, 0), 358 - pci_resource_len(dev, 0)); 357 + fm->addr = pci_ioremap_bar(dev, 0); 359 358 if (!fm->addr) 360 359 goto err_out_free; 361 360