diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2009-12-08 16:34:17 -0700 |
---|---|---|
committer | paul <paul@twilight.(none)> | 2009-12-11 17:00:43 -0700 |
commit | a470c42cb89a5282f816b37a0d1eef68fe455f31 (patch) | |
tree | 40c92db9bbbe1f8ced101640efac04b528fad8a2 | |
parent | a16b1f7f8692163e0c6b4741d8980837dfca75f1 (diff) | |
download | blackbird-op-linux-a470c42cb89a5282f816b37a0d1eef68fe455f31.tar.gz blackbird-op-linux-a470c42cb89a5282f816b37a0d1eef68fe455f31.zip |
OMAP: omap_device: add to_omap_device() macro
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>
-rw-r--r-- | 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 11a9773a4e7f..d93924699a1b 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 |