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>
This commit is contained in:
Kevin Hilman 2009-12-08 16:34:17 -07:00 committed by paul
parent a16b1f7f86
commit a470c42cb8
1 changed files with 3 additions and 1 deletions

View 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