summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/udl/udl_drv.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-09-08 12:51:15 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2022-09-10 22:45:53 +0300
commitfa47573b04a35078953be5f81a78f22c96358817 (patch)
treebd72cc4facba2e8dba1ecd527231e287c44fee15 /drivers/gpu/drm/udl/udl_drv.c
parent2c2705bd09730dba6017b26897a2bcd3c5d21557 (diff)
downloadlinux-fa47573b04a35078953be5f81a78f22c96358817.tar.xz
drm/udl: Sync pending URBs at the end of suspend
It's better to perform the sync at the very last of the suspend instead of the pipe-disable function, so that we can catch all pending URBs (if any). While we're at it, drop the error code from udl_sync_pending_urb() since we basically ignore it; instead, give a clear error message indicating a problem. Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20220908095115.23396-13-tiwai@suse.de
Diffstat (limited to 'drivers/gpu/drm/udl/udl_drv.c')
-rw-r--r--drivers/gpu/drm/udl/udl_drv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c
index 0ba88e5472a9..91effdcefb6d 100644
--- a/drivers/gpu/drm/udl/udl_drv.c
+++ b/drivers/gpu/drm/udl/udl_drv.c
@@ -21,8 +21,14 @@ static int udl_usb_suspend(struct usb_interface *interface,
pm_message_t message)
{
struct drm_device *dev = usb_get_intfdata(interface);
+ int ret;
- return drm_mode_config_helper_suspend(dev);
+ ret = drm_mode_config_helper_suspend(dev);
+ if (ret)
+ return ret;
+
+ udl_sync_pending_urbs(dev);
+ return 0;
}
static int udl_usb_resume(struct usb_interface *interface)