OMAP: omap_device: add to_omap_device() macro
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- arch/arm/plat-omap/include/plat/omap_device.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/plat-omap/include/plat/omap_device.h +3 -1
@@ -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
Signature · 1 line
1.6.5.1
Quoted 5 lines · Kevin Hilman
Following the model of
to_platform_device(), addto_omap_device()macro so aplatform_devicepointer can be converted into anomap_devicepointer.Signed-off-by Kevin Hilman <[email protected]>
Thanks, I'll add this to the rest of the hwmod patches for 2.6.33.
- Paul