drm/atomic: Avoid connector to writeback_connector casts
authorBoris Brezillon <boris.brezillon@bootlin.com>
Tue, 3 Jul 2018 07:50:15 +0000 (09:50 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Sat, 7 Jul 2018 05:51:19 +0000 (07:51 +0200)
commitb82c1f8f78b4d273d1bcefe3e805eff61e879a68
treed20bc6cab499daa98b5f59b1a755073f6ed2ffaa
parent73915b2b1f2581cbce5a511550c2cac2e2b42595
drm/atomic: Avoid connector to writeback_connector casts

Use container_of() instead of type casting so that it keeps working
even if base is moved inside the drm_writeback_connector struct.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180703075022.15138-2-boris.brezillon@bootlin.com
drivers/gpu/drm/drm_atomic.c
include/drm/drm_writeback.h