drm/arm/hdlcd: use drmm_* to allocate driver structures
authorDanilo Krummrich <dakr@redhat.com>
Wed, 26 Oct 2022 15:34:28 +0000 (17:34 +0200)
committerLiviu Dudau <liviu.dudau@arm.com>
Mon, 7 Nov 2022 20:47:33 +0000 (20:47 +0000)
commit9914013fe65647b5c0afc732da1adc9bc62a0a26
tree8541ab95277ba847eda0fc3644e2ca9dd2826aba
parent4b71e269f5a51ee12672ca6084c319930c144a62
drm/arm/hdlcd: use drmm_* to allocate driver structures

Use drm managed resources to allocate driver structures and get rid of
the deprecated drm_dev_alloc() call and replace it with
devm_drm_dev_alloc().

This also serves as preparation to get rid of drm_device->dev_private
and to fix use-after-free issues on driver unload.

Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221026153431.72033-2-dakr@redhat.com
drivers/gpu/drm/arm/hdlcd_drv.c
drivers/gpu/drm/arm/hdlcd_drv.h