Skip to contentSkip to conversation

pci: use pci_ioremap_bar() in drivers/i2c

PATCH Applied Arjan van de Ven 2 participants 2 messages Oct 21, 2008 1 message not in the archive I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: use pci_ioremap_bar() in drivers/i2c

Quoted 1 line

From 2642176b21b402e7f1ea7697ad2659d0e7e59f6e Mon Sep 17 00:00:00 2001

From: Arjan van de Ven <arjan-VuQAYsv1563Yd54FQh9/[email protected]>
Date: Sun, 28 Sep 2008 16:13:48 -0700
Subject: [PATCH] pci: use pci_ioremap_bar() in drivers/i2c

Use the newly introduced pci_ioremap_bar() function in drivers/i2c. 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/i2c/busses/i2c-hydra.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-hydra.c +1 -1
index 1098f21..648aa7b 100644
@@ -123,7 +123,7 @@ static int __devinit hydra_probe(struct pci_dev *dev,
 				hydra_adap.name))
 		return -EBUSY;
 
-	hydra_bit_data.data = ioremap(base, pci_resource_len(dev, 0));
+	hydra_bit_data.data = pci_ioremap_bar(dev, 0);
 	if (hydra_bit_data.data == NULL) {
 		release_mem_region(base+offsetof(struct Hydra, CachePD), 4);
 		return -ENODEV;
Signature · 13 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

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c

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

Applied
#2 lore raw

Hi Arjen,

Quoted 21 lines · Arjan van de Ven

From 2642176b21b402e7f1ea7697ad2659d0e7e59f6e Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan-VuQAYsv1563Yd54FQh9/[email protected]>
Date: Sun, 28 Sep 2008 16:13:48 -0700
Subject: [PATCH] pci: use pci_ioremap_bar() in drivers/i2c

Use the newly introduced pci_ioremap_bar() function in drivers/i2c. 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/i2c/busses/i2c-hydra.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-hydra.c +0 -0
index 1098f21..648aa7b 100644

drivers/i2c/busses/i2c-hydra.c static int __devinit hydra_probe(struct pci_dev *dev, · line 129

Quoted 8 lines
drivers/i2c/busses/i2c-hydra.c +1 -1
@@ -123,7 +123,7 @@ static int __devinit hydra_probe(struct pci_dev *dev,
 				hydra_adap.name))
 		return -EBUSY;
 
-	hydra_bit_data.data = ioremap(base, pci_resource_len(dev, 0));
+	hydra_bit_data.data = pci_ioremap_bar(dev, 0);
 	if (hydra_bit_data.data == NULL) {
 		release_mem_region(base+offsetof(struct Hydra, CachePD), 4);
 		return -ENODEV;

Applied, thanks.

Signature · 6 lines
Jean Delvare

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c