tegra_plane_reset() does the state initialisation by copying a lot of the code found in the __drm_atomic_helper_plane_reset(). Let's switch to that helper and reduce the boilerplate. Cc: linux-tegra@xxxxxxxxxxxxxxx Cc: Jonathan Hunter <jonathanh@xxxxxxxxxx> Cc: Thierry Reding <thierry.reding@xxxxxxxxx> Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx> --- drivers/gpu/drm/tegra/plane.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c index 321cb1f13da6..ec0822c86926 100644 --- a/drivers/gpu/drm/tegra/plane.c +++ b/drivers/gpu/drm/tegra/plane.c @@ -37,8 +37,7 @@ static void tegra_plane_reset(struct drm_plane *plane) state = kzalloc(sizeof(*state), GFP_KERNEL); if (state) { - plane->state = &state->base; - plane->state->plane = plane; + __drm_atomic_helper_plane_reset(plane, &state->base); plane->state->zpos = p->index; plane->state->normalized_zpos = p->index; -- 2.35.1