OMAP: omap_device: add to_omap_device() macro
authorKevin Hilman <khilman@deeprootsystems.com>
Tue, 8 Dec 2009 23:34:17 +0000 (16:34 -0700)
committerpaul <paul@twilight.(none)>
Sat, 12 Dec 2009 00:00:43 +0000 (17:00 -0700)
Following the model of to_platform_device(), add to_omap_device()
macro so a platform_device pointer can be converted into an
omap_device pointer.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
arch/arm/plat-omap/include/plat/omap_device.h

index 11a9773..d939246 100644 (file)
@@ -137,5 +137,7 @@ struct omap_device_pm_latency {
 };
 
 
-#endif
+/* Get omap_device pointer from platform_device pointer */
+#define to_omap_device(x) container_of((x), struct omap_device, pdev)
 
+#endif