diff options
author | Gabriel Krisman Bertazi <krisman@collabora.co.uk> | 2017-01-19 11:48:06 -0200 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.com> | 2017-01-19 15:33:30 -0200 |
commit | 6f897f51c4181397bf811d260eb7fef8d7ccd14f (patch) | |
tree | 7fe2ad063151f24ff3a901b6ce58dad8ef8d764e /drivers/gpu/drm/qxl | |
parent | 2b65d5677a797f8b53e97548003d1f38677fee81 (diff) | |
download | op-kernel-dev-6f897f51c4181397bf811d260eb7fef8d7ccd14f.zip op-kernel-dev-6f897f51c4181397bf811d260eb7fef8d7ccd14f.tar.gz |
drm: qxl: Open code teardown function for qxl
This avoids using the deprecated drm_put_dev() and unload() hook
interfaces in the qxl driver.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Gustavo Padovan <gustavo.padovan@collabora.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170119134806.8926-2-krisman@collabora.co.uk
Diffstat (limited to 'drivers/gpu/drm/qxl')
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_drv.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_drv.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_kms.c | 16 |
3 files changed, 9 insertions, 20 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 7cc2902..6e0f8a2 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -129,8 +129,16 @@ static void qxl_pci_remove(struct pci_dev *pdev) { struct drm_device *dev = pci_get_drvdata(pdev); + struct qxl_device *qdev = dev->dev_private; + + drm_dev_unregister(dev); + + qxl_modeset_fini(qdev); + qxl_device_fini(qdev); - drm_put_dev(dev); + dev->dev_private = NULL; + kfree(qdev); + drm_dev_unref(dev); } static const struct file_operations qxl_fops = { @@ -285,7 +293,6 @@ static struct pci_driver qxl_pci_driver = { static struct drm_driver qxl_driver = { .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED, - .unload = qxl_driver_unload, .get_vblank_counter = qxl_noop_get_vblank_counter, .enable_vblank = qxl_noop_enable_vblank, .disable_vblank = qxl_noop_disable_vblank, diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 8320198..0d877fa 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -340,8 +340,6 @@ int qxl_device_init(struct qxl_device *qdev, struct drm_device *ddev, struct pci_dev *pdev, unsigned long flags); void qxl_device_fini(struct qxl_device *qdev); -void qxl_driver_unload(struct drm_device *dev); - int qxl_modeset_init(struct qxl_device *qdev); void qxl_modeset_fini(struct qxl_device *qdev); diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index 6848057..d0666f5d 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -284,19 +284,3 @@ void qxl_device_fini(struct qxl_device *qdev) qdev->mode_info.num_modes = 0; qxl_debugfs_remove_files(qdev); } - -void qxl_driver_unload(struct drm_device *dev) -{ - struct qxl_device *qdev = dev->dev_private; - - if (qdev == NULL) - return; - - drm_vblank_cleanup(dev); - - qxl_modeset_fini(qdev); - qxl_device_fini(qdev); - - kfree(qdev); - dev->dev_private = NULL; -} |