mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 00:12:52 +00:00
drm/drv: drm_dev_unplug(): Move out drm_dev_put() call
This makes it possible to use drm_dev_unplug() with the upcoming devm_drm_dev_init() which will do drm_dev_put() in its release callback. Cc: Alex Deucher <[email protected]> Cc: Christian König <[email protected]> Cc: David (ChunMing) Zhou <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Sean Paul <[email protected]> Cc: Oleksandr Andrushchenko <[email protected]> Cc: Daniel Vetter <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Oleksandr Andrushchenko <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
@@ -973,6 +973,7 @@ amdgpu_pci_remove(struct pci_dev *pdev)
|
||||
|
||||
DRM_ERROR("Device removal is currently not supported outside of fbcon\n");
|
||||
drm_dev_unplug(dev);
|
||||
drm_dev_put(dev);
|
||||
pci_disable_device(pdev);
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
}
|
||||
|
||||
@@ -376,7 +376,6 @@ void drm_dev_unplug(struct drm_device *dev)
|
||||
synchronize_srcu(&drm_unplug_srcu);
|
||||
|
||||
drm_dev_unregister(dev);
|
||||
drm_dev_put(dev);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_dev_unplug);
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ static void udl_usb_disconnect(struct usb_interface *interface)
|
||||
udl_fbdev_unplug(dev);
|
||||
udl_drop_usb(dev);
|
||||
drm_dev_unplug(dev);
|
||||
drm_dev_put(dev);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -582,6 +582,7 @@ static void xen_drm_drv_fini(struct xen_drm_front_info *front_info)
|
||||
|
||||
drm_kms_helper_poll_fini(dev);
|
||||
drm_dev_unplug(dev);
|
||||
drm_dev_put(dev);
|
||||
|
||||
front_info->drm_info = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user