summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tiny
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2020-03-23 15:49:16 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2020-03-26 15:26:52 +0100
commitb6731025a52f19f86feae0b9c086390a0eec214d (patch)
treeab16c544083ca71a52099e799c797cc2460146c5 /drivers/gpu/drm/tiny
parentdrm/ingenic: Use drmm_add_final_kfree (diff)
downloadlinux-b6731025a52f19f86feae0b9c086390a0eec214d.tar.xz
linux-b6731025a52f19f86feae0b9c086390a0eec214d.zip
drm/gm12u320: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function. Acked-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-18-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/tiny')
-rw-r--r--drivers/gpu/drm/tiny/gm12u320.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tiny/gm12u320.c b/drivers/gpu/drm/tiny/gm12u320.c
index a48173441ae0..524ca0941cf9 100644
--- a/drivers/gpu/drm/tiny/gm12u320.c
+++ b/drivers/gpu/drm/tiny/gm12u320.c
@@ -19,6 +19,7 @@
#include <drm/drm_gem_shmem_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_ioctl.h>
+#include <drm/drm_managed.h>
#include <drm/drm_modeset_helper_vtables.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
@@ -637,7 +638,6 @@ static void gm12u320_driver_release(struct drm_device *dev)
gm12u320_usb_free(gm12u320);
drm_mode_config_cleanup(dev);
drm_dev_fini(dev);
- kfree(gm12u320);
}
DEFINE_DRM_GEM_FOPS(gm12u320_fops);
@@ -692,6 +692,7 @@ static int gm12u320_usb_probe(struct usb_interface *interface,
return ret;
}
dev->dev_private = gm12u320;
+ drmm_add_final_kfree(dev, gm12u320);
drm_mode_config_init(dev);
dev->mode_config.min_width = GM12U320_USER_WIDTH;