staging: vboxvideo: Call fb_deferred_io_cleanup() on cleanup
authorHans de Goede <hdegoede@redhat.com>
Sun, 6 Aug 2017 13:08:42 +0000 (15:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Aug 2017 22:57:15 +0000 (15:57 -0700)
On driver cleanup we need to call fb_deferred_io_cleanup() if build
with CONFIG_FB_DEFERRED_IO set.

Suggested-by: Michael Thayer <michael.thayer@oracle.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vboxvideo/vbox_fb.c

index 3c09aa468924d3ba7cc2aea65c21b79b01e23803..56e3908b28a5f7b3d10810396e06ca6028d369f5 100644 (file)
@@ -342,6 +342,11 @@ void vbox_fbdev_fini(struct drm_device *dev)
        struct vbox_fbdev *fbdev = vbox->fbdev;
        struct vbox_framebuffer *afb = &fbdev->afb;
 
+#ifdef CONFIG_FB_DEFERRED_IO
+       if (fbdev->helper.fbdev && fbdev->helper.fbdev->fbdefio)
+               fb_deferred_io_cleanup(fbdev->helper.fbdev);
+#endif
+
        drm_fb_helper_unregister_fbi(&fbdev->helper);
 
        if (afb->obj) {