Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
[linux-2.6-block.git] / drivers / i2c / busses / i2c-tegra.c
index e58a58d7231c6f93d1a2452681358cdb7ce506a6..36704e3ab3fa9a87cdd9ca53e825f80792c28732 100644 (file)
 #include <linux/of_i2c.h>
 #include <linux/of_device.h>
 #include <linux/module.h>
+#include <linux/clk/tegra.h>
 
 #include <asm/unaligned.h>
 
-#include <mach/clk.h>
-
 #define TEGRA_I2C_TIMEOUT (msecs_to_jiffies(1000))
 #define BYTES_PER_FIFO_WORD 4
 
@@ -716,11 +715,9 @@ static int tegra_i2c_probe(struct platform_device *pdev)
                return -EINVAL;
        }
 
-       base = devm_request_and_ioremap(&pdev->dev, res);
-       if (!base) {
-               dev_err(&pdev->dev, "Cannot request/ioremap I2C registers\n");
-               return -EADDRNOTAVAIL;
-       }
+       base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(base))
+               return PTR_ERR(base);
 
        res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
        if (!res) {