Skip to content

Commit

Permalink
i2c: Use pci_ioremap_bar()
Browse files Browse the repository at this point in the history
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: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Arjan van de Ven authored and Jean Delvare committed Oct 22, 2008
1 parent 00155a9 commit c7a5f22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-hydra.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c7a5f22

Please sign in to comment.