linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pci: use pci_ioremap_bar() in drivers/ide
@ 2008-10-21  4:48 Arjan van de Ven
  2008-10-21 10:02 ` Sergei Shtylyov
  0 siblings, 1 reply; 10+ messages in thread
From: Arjan van de Ven @ 2008-10-21  4:48 UTC (permalink / raw)
  To: linux-ide

>From 9233d7e38207749586c47410b400afcf3e7e59fb Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Sun, 28 Sep 2008 16:14:10 -0700
Subject: [PATCH] pci: use pci_ioremap_bar() in drivers/ide

Use the newly introduced pci_ioremap_bar() function in drivers/ide.
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>
---
 drivers/ide/pci/sgiioc4.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index 8af9b23..9233217 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -574,7 +574,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
 
 	/*  Get the CmdBlk and CtrlBlk Base Registers */
 	bar0 = pci_resource_start(dev, 0);
-	virt_base = ioremap(bar0, pci_resource_len(dev, 0));
+	virt_base = pci_ioremap_bar(dev, 0);
 	if (virt_base == NULL) {
 		printk(KERN_ERR "%s: Unable to remap BAR 0 address: 0x%lx\n",
 				DRV_NAME, bar0);
-- 
1.5.5.1



-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-10-23 21:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-21  4:48 [PATCH] pci: use pci_ioremap_bar() in drivers/ide Arjan van de Ven
2008-10-21 10:02 ` Sergei Shtylyov
2008-10-22 17:40   ` Sergei Shtylyov
2008-10-22 17:56     ` Arjan van de Ven
2008-10-22 18:08       ` Sergei Shtylyov
2008-10-22 20:23     ` Arjan van de Ven
2008-10-22 20:38       ` Sergei Shtylyov
2008-10-22 20:42         ` Sergei Shtylyov
2008-10-23 19:39         ` Bartlomiej Zolnierkiewicz
2008-10-23 19:35   ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).