From: Arjan van de Ven <arjan@infradead.org>
To: linux-ide@vger.kernel.org
Subject: [PATCH] pci: use pci_ioremap_bar() in drivers/ide
Date: Mon, 20 Oct 2008 21:48:30 -0700 [thread overview]
Message-ID: <20081020214830.1586704c@infradead.org> (raw)
>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
next reply other threads:[~2008-10-21 4:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 4:48 Arjan van de Ven [this message]
2008-10-21 10:02 ` [PATCH] pci: use pci_ioremap_bar() in drivers/ide 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081020214830.1586704c@infradead.org \
--to=arjan@infradead.org \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.