Merge branch 'stable/generic' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
[pandora-kernel.git] / arch / arm / plat-omap / i2c.c
index a5bff9c..a4f8003 100644 (file)
@@ -40,7 +40,7 @@
 #define OMAP_I2C_SIZE          0x3f
 #define OMAP1_I2C_BASE         0xfffb3800
 
-static const char name[] = "i2c_omap";
+static const char name[] = "omap_i2c";
 
 #define I2C_RESOURCE_BUILDER(base, irq)                        \
        {                                               \
@@ -97,10 +97,15 @@ static inline int omap1_i2c_add_bus(int bus_id)
 {
        struct platform_device *pdev;
        struct omap_i2c_bus_platform_data *pdata;
+       struct resource *res;
 
        omap1_i2c_mux_pins(bus_id);
 
        pdev = &omap_i2c_devices[bus_id - 1];
+       res = pdev->resource;
+       res[0].start = OMAP1_I2C_BASE;
+       res[0].end = res[0].start + OMAP_I2C_SIZE;
+       res[1].start = INT_I2C;
        pdata = &i2c_pdata[bus_id - 1];
 
        return platform_device_register(pdev);
@@ -125,6 +130,7 @@ static struct omap_device_pm_latency omap_i2c_latency[] = {
        },
 };
 
+#ifdef CONFIG_ARCH_OMAP2PLUS
 static inline int omap2_i2c_add_bus(int bus_id)
 {
        int l;
@@ -161,6 +167,12 @@ static inline int omap2_i2c_add_bus(int bus_id)
 
        return PTR_ERR(od);
 }
+#else
+static inline int omap2_i2c_add_bus(int bus_id)
+{
+       return 0;
+}
+#endif
 
 static int __init omap_i2c_add_bus(int bus_id)
 {