Commit afeeabb8 authored by Daniel Vetter's avatar Daniel Vetter

drm/tidss: Use drmm_add_final_kfree

With this we can drop the final kfree from the release function.
Acked-by: default avatarJyri Sarha <jsarha@ti.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Cc: Jyri Sarha <jsarha@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-12-daniel.vetter@ffwll.ch
parent ea3aa620
......@@ -17,6 +17,7 @@
#include <drm/drm_fb_helper.h>
#include <drm/drm_gem_cma_helper.h>
#include <drm/drm_irq.h>
#include <drm/drm_managed.h>
#include <drm/drm_probe_helper.h>
#include "tidss_dispc.h"
......@@ -109,8 +110,6 @@ static void tidss_release(struct drm_device *ddev)
tidss_modeset_cleanup(tidss);
drm_dev_fini(ddev);
kfree(tidss);
}
DEFINE_DRM_GEM_CMA_FOPS(tidss_fops);
......@@ -154,6 +153,7 @@ static int tidss_probe(struct platform_device *pdev)
kfree(ddev);
return ret;
}
drmm_add_final_kfree(ddev, tidss);
tidss->dev = dev;
tidss->feat = of_device_get_match_data(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment