mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 14:26:41 +07:00
drm/mcde: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function. v2: Fix unused variable warning, spotted while applying. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-13-daniel.vetter@ffwll.ch
This commit is contained in:
parent
afeeabb88b
commit
e2edcaaa3d
@ -72,6 +72,7 @@
|
||||
#include <drm/drm_gem.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
#include <drm/drm_gem_framebuffer_helper.h>
|
||||
#include <drm/drm_managed.h>
|
||||
#include <drm/drm_of.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <drm/drm_panel.h>
|
||||
@ -219,11 +220,8 @@ static int mcde_modeset_init(struct drm_device *drm)
|
||||
|
||||
static void mcde_release(struct drm_device *drm)
|
||||
{
|
||||
struct mcde *mcde = drm->dev_private;
|
||||
|
||||
drm_mode_config_cleanup(drm);
|
||||
drm_dev_fini(drm);
|
||||
kfree(mcde);
|
||||
}
|
||||
|
||||
DEFINE_DRM_GEM_CMA_FOPS(drm_fops);
|
||||
@ -330,6 +328,7 @@ static int mcde_probe(struct platform_device *pdev)
|
||||
}
|
||||
drm = &mcde->drm;
|
||||
drm->dev_private = mcde;
|
||||
drmm_add_final_kfree(drm, mcde);
|
||||
platform_set_drvdata(pdev, drm);
|
||||
|
||||
/* Enable continuous updates: this is what Linux' framebuffer expects */
|
||||
|
Loading…
Reference in New Issue
Block a user