提交 c7a5f22d 编写于 作者: A Arjan van de Ven 提交者: Jean Delvare

i2c: Use pci_ioremap_bar()

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.
Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
Signed-off-by: NJean Delvare <khali@linux-fr.org>
上级 00155a94
...@@ -123,7 +123,7 @@ static int __devinit hydra_probe(struct pci_dev *dev, ...@@ -123,7 +123,7 @@ static int __devinit hydra_probe(struct pci_dev *dev,
hydra_adap.name)) hydra_adap.name))
return -EBUSY; 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) { if (hydra_bit_data.data == NULL) {
release_mem_region(base+offsetof(struct Hydra, CachePD), 4); release_mem_region(base+offsetof(struct Hydra, CachePD), 4);
return -ENODEV; return -ENODEV;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册