* [PATCH] pci: use pci_ioremap_bar() in drivers/i2c
@ 2008-10-21 4:57 Arjan van de Ven
[not found] ` <20081020215751.17cdfe46-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Arjan van de Ven @ 2008-10-21 4:57 UTC (permalink / raw)
To: i2c-GZX6beZjE8VD60Wz+7aTrA
Cc: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
ben-linux-elnMNo+KYs3YtjvyW6yDsg
>From 2642176b21b402e7f1ea7697ad2659d0e7e59f6e Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
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.
CC: khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org
Signed-off-by: Arjan van de Ven <arjan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
drivers/i2c/busses/i2c-hydra.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-hydra.c b/drivers/i2c/busses/i2c-hydra.c
index 1098f21..648aa7b 100644
--- a/drivers/i2c/busses/i2c-hydra.c
+++ b/drivers/i2c/busses/i2c-hydra.c
@@ -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;
--
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
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-21 8:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-21 4:57 [PATCH] pci: use pci_ioremap_bar() in drivers/i2c Arjan van de Ven
[not found] ` <20081020215751.17cdfe46-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2008-10-21 8:49 ` Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox