diff mbox

OMAP: omap_device: add to_omap_device() macro

Message ID 1259088117-25834-1-git-send-email-khilman@deeprootsystems.com (mailing list archive)
State Accepted, archived
Delegated to: Paul Walmsley
Headers show

Commit Message

Kevin Hilman Nov. 24, 2009, 6:41 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index 11a9773..d939246 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -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