Skip to content

Commit

Permalink
OMAP: omap_device: add to_omap_device() macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kevin Hilman authored and paul committed Dec 12, 2009
1 parent a16b1f7 commit a470c42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/arm/plat-omap/include/plat/omap_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a470c42

Please sign in to comment.