pci: use pci_ioremap_bar() in drivers/video
Use the newly introduced pci_ioremap_bar() function in drivers/video. 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> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
ab5dc37202
commit
3c36aa5ccd
@@ -1583,8 +1583,7 @@ cyberpro_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
goto failed_release;
|
||||
|
||||
cfb->dev = dev;
|
||||
cfb->region = ioremap(pci_resource_start(dev, 0),
|
||||
pci_resource_len(dev, 0));
|
||||
cfb->region = pci_ioremap_bar(dev, 0);
|
||||
if (!cfb->region)
|
||||
goto failed_ioremap;
|
||||
|
||||
|
Reference in New Issue
Block a user