Re: [PATCH] OMAP: omap_device: add to_omap_device() macro

2009-12-01 Thread Paul Walmsley
On Tue, 24 Nov 2009, Kevin Hilman wrote:

 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 khil...@deeprootsystems.com

Thanks, I'll add this to the rest of the hwmod patches for 2.6.33.

- Paul
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] OMAP: omap_device: add to_omap_device() macro

2009-11-24 Thread Kevin Hilman
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 khil...@deeprootsystems.com
---
 arch/arm/plat-omap/include/plat/omap_device.h |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

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
-- 
1.6.5.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html