Pārlūkot izejas kodu

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>
Kevin Hilman 15 gadi atpakaļ
vecāks
revīzija
a470c42cb8
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      arch/arm/plat-omap/include/plat/omap_device.h

+ 3 - 1
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