OMAP: omap_device: _disable_idle_on_suspend() takes platform_device pointer
authorKevin Hilman <khilman@ti.com>
Mon, 1 Aug 2011 16:33:13 +0000 (09:33 -0700)
committerKevin Hilman <khilman@ti.com>
Thu, 15 Sep 2011 23:35:47 +0000 (16:35 -0700)
Public omap_device functions need to take platform_device pointers,
conversion to omap_device pointers is done internal to the omap_device
layer.

Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/gpio.c
arch/arm/mach-omap2/serial.c
arch/arm/plat-omap/include/plat/omap_device.h

index 76abdcb6e0b0a67f50e46c600f498beebe9646a4..652ccc5741965f2e318a0ad82d3eee4e2aecd47b 100644 (file)
@@ -119,7 +119,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
                return PTR_ERR(pdev);
        }
 
-       omap_device_disable_idle_on_suspend(od);
+       omap_device_disable_idle_on_suspend(pdev);
 
        gpio_bank_count++;
        return 0;
index 53b68087813852803be9212d507a7caa2671e1b1..3d1c1d393f8fda0803f7a4a90b6ce27ce4dff887 100644 (file)
@@ -805,7 +805,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
        WARN(IS_ERR(pdev), "Could not build omap_device for %s: %s.\n",
             name, oh->name);
 
-       omap_device_disable_idle_on_suspend(od);
+       omap_device_disable_idle_on_suspend(pdev);
        oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
 
        uart->irq = oh->mpu_irqs[0].irq;
index 750f401051d17a686b5722d43b26770ad173bc3e..4f98770b1d8c9a0f1a101ced6b7ba921eabb7b99 100644 (file)
@@ -116,11 +116,6 @@ int omap_device_enable_hwmods(struct omap_device *od);
 int omap_device_disable_clocks(struct omap_device *od);
 int omap_device_enable_clocks(struct omap_device *od);
 
-static inline void omap_device_disable_idle_on_suspend(struct omap_device *od)
-{
-       od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND;
-}
-
 /*
  * Entries should be kept in latency order ascending
  *
@@ -153,4 +148,12 @@ struct omap_device_pm_latency {
 /* Get omap_device pointer from platform_device pointer */
 #define to_omap_device(x) container_of((x), struct omap_device, pdev)
 
+static inline
+void omap_device_disable_idle_on_suspend(struct platform_device *pdev)
+{
+       struct omap_device *od = to_omap_device(pdev);
+
+       od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND;
+}
+
 #endif