[PATCH weston v5 41/42] compositor-drm: Don't open-code to_drm_output

Daniel Stone daniels at collabora.com
Wed Nov 16 14:25:33 UTC 2016


Use this rather than container_of.

Signed-off-by: Daniel Stone <daniels at collabora.com>

Differential Revision: https://phabricator.freedesktop.org/D1506
---
 libweston/compositor-drm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 920b41c..51f03df 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -3150,8 +3150,7 @@ drm_get_prop(int fd, drmModeConnectorPtr connector, const char *name)
 static void
 drm_set_dpms(struct weston_output *output_base, enum dpms_enum level)
 {
-	struct drm_output *output =
-		container_of(output_base, struct drm_output, base);
+	struct drm_output *output = to_drm_output(output_base);
 	int ret;
 
 
-- 
2.9.3



More information about the wayland-devel mailing list