aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/omap_device.h
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-07-21 16:58:51 -0400
committerKevin Hilman <khilman@ti.com>2011-09-15 19:35:47 -0400
commitd66b3fe436a296f102e8944247972fc0c17ddf26 (patch)
treed1b15398c457f54380fb50ed3fb8d6756043cb0c /arch/arm/plat-omap/include/plat/omap_device.h
parent9f8b6949d78f1306eef0edc14bc1fbcaf3e58ad0 (diff)
OMAP: omap_device: decouple platform_device from omap_device
Rather than embedding a struct platform_device inside a struct omap_device, decouple them, leaving only a pointer to the platform_device inside the omap_device. Use the arch-specific data field of the platform_device (pdev_archdata) to add an omap_device pointer after the platform_device has been created. Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/omap_device.h')
-rw-r--r--arch/arm/plat-omap/include/plat/omap_device.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index 4f98770b1d8c..d4d9b96f961e 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -68,7 +68,7 @@ extern struct device omap_device_parent;
68 * 68 *
69 */ 69 */
70struct omap_device { 70struct omap_device {
71 struct platform_device pdev; 71 struct platform_device *pdev;
72 struct omap_hwmod **hwmods; 72 struct omap_hwmod **hwmods;
73 struct omap_device_pm_latency *pm_lats; 73 struct omap_device_pm_latency *pm_lats;
74 u32 dev_wakeup_lat; 74 u32 dev_wakeup_lat;
@@ -146,7 +146,10 @@ struct omap_device_pm_latency {
146#define OMAP_DEVICE_LATENCY_AUTO_ADJUST BIT(1) 146#define OMAP_DEVICE_LATENCY_AUTO_ADJUST BIT(1)
147 147
148/* Get omap_device pointer from platform_device pointer */ 148/* Get omap_device pointer from platform_device pointer */
149#define to_omap_device(x) container_of((x), struct omap_device, pdev) 149static inline struct omap_device *to_omap_device(struct platform_device *pdev)
150{
151 return pdev ? pdev->archdata.od : NULL;
152}
150 153
151static inline 154static inline
152void omap_device_disable_idle_on_suspend(struct platform_device *pdev) 155void omap_device_disable_idle_on_suspend(struct platform_device *pdev)