Skip to contentSkip to conversation

pci: use pci_ioremap_bar() in drivers/uio

PATCH Applied Hans J. Koch 2 participants 2 messages Oct 21, 2008 – Oct 27, 2008 1 message not in the archive Userspace I/O (UIO)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Added Greg KH to CC since he handles the UIO patch queue. Also added lkml since UIO patches are discussed there.

Quoted 6 lines · Arjan van de Ven
Quoted 2 lines

From 8d0e600e37f36d379b2f7652912f1b1090c9dfa3 Mon Sep 17 00:00:00 2001

From: Arjan van de Ven <[email protected]>
Date: Sun, 28 Sep 2008 16:20:35 -0700
Subject: [PATCH] pci: use pci_ioremap_bar() in drivers/uio

Quoted 7 lines

Use the newly introduced pci_ioremap_bar() function in drivers/uio. 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.

Quoted 26 lines
---
 drivers/uio/uio_cif.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/uio/uio_cif.c +1 -2
index 5737606..c60b8fc 100644
@@ -57,8 +57,7 @@ static int __devinit hilscher_pci_probe(struct pci_dev *dev,
 	info->mem[0].addr = pci_resource_start(dev, 0);
 	if (!info->mem[0].addr)
 		goto out_release;
-	info->mem[0].internal_addr = ioremap(pci_resource_start(dev, 0),
-					     pci_resource_len(dev, 0));
+	info->mem[0].internal_addr = pci_ioremap_bar(dev, 0);
 	if (!info->mem[0].internal_addr)
 		goto out_release;
 
Signature · 7 lines
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
#2 lore raw

patch uio-use-pci_ioremap_bar-in-drivers-uio.patch added to gregkh-2.6 tree

This is a note to let you know that I've just added the patch titled

Subject: UIO: use pci_ioremap_bar() in drivers/uio

to my gregkh-2.6 tree. Its filename is

uio-use-pci_ioremap_bar-in-drivers-uio.patch

This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/

Quoted 1 line

From [email protected] Mon Oct 27 11:23:22 2008

From: Arjan van de Ven <[email protected]>
Date: Tue, 21 Oct 2008 11:17:51 +0200
Subject: UIO: use pci_ioremap_bar() in drivers/uio
To: Arjan van de Ven <[email protected]>
Cc: [email protected], [email protected], Greg KH <[email protected]>, LKML <[email protected]>
Message-ID: <20081021091750.GA2966@local>
Content-Disposition: inline

From: Arjan van de Ven <[email protected]>

Use the newly introduced pci_ioremap_bar() function in drivers/uio. 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.

---
 drivers/uio/uio_cif.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/uio/uio_cif.c +1 -2
@@ -57,8 +57,7 @@ static int __devinit hilscher_pci_probe(
 	info->mem[0].addr = pci_resource_start(dev, 0);
 	if (!info->mem[0].addr)
 		goto out_release;
-	info->mem[0].internal_addr = ioremap(pci_resource_start(dev, 0),
-					     pci_resource_len(dev, 0));
+	info->mem[0].internal_addr = pci_ioremap_bar(dev, 0);
 	if (!info->mem[0].internal_addr)
 		goto out_release;
 

Patches currently in gregkh-2.6 which might be from [email protected] are

usb/usb-use-pci_ioremap_bar-in-drivers-usb.patch driver-core/uio-use-pci_ioremap_bar-in-drivers-uio.patch