]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/qxl: Remove references to struct drm_device.pdev
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 1 Dec 2020 10:35:36 +0000 (11:35 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 6 Jan 2021 14:43:14 +0000 (15:43 +0100)
Using struct drm_device.pdev is deprecated. Convert qxl to struct
drm_device.dev. No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-15-tzimmermann@suse.de
drivers/gpu/drm/qxl/qxl_drv.c
drivers/gpu/drm/qxl/qxl_ioctl.c
drivers/gpu/drm/qxl/qxl_irq.c
drivers/gpu/drm/qxl/qxl_kms.c

index 6e7f16f4cec794dd0ec82f295dc0a203fd956eac..fb5f6a5e81d764f8107bb157d9dc377e94f7c906 100644 (file)
@@ -163,7 +163,7 @@ DEFINE_DRM_GEM_FOPS(qxl_fops);
 
 static int qxl_drm_freeze(struct drm_device *dev)
 {
-       struct pci_dev *pdev = dev->pdev;
+       struct pci_dev *pdev = to_pci_dev(dev->dev);
        struct qxl_device *qdev = to_qxl(dev);
        int ret;
 
index 16e1e589508e20a57f2e2125edb4beb99748fe84..b6075f452b9e02a1294b04563432969d437528cd 100644 (file)
@@ -370,13 +370,14 @@ static int qxl_clientcap_ioctl(struct drm_device *dev, void *data,
                                  struct drm_file *file_priv)
 {
        struct qxl_device *qdev = to_qxl(dev);
+       struct pci_dev *pdev = to_pci_dev(dev->dev);
        struct drm_qxl_clientcap *param = data;
        int byte, idx;
 
        byte = param->index / 8;
        idx = param->index % 8;
 
-       if (dev->pdev->revision < 4)
+       if (pdev->revision < 4)
                return -ENOSYS;
 
        if (byte >= 58)
index 1ba5a702d7636d862756b9b3cb2705ca16021d40..ddf6588a2a3822ff1b6cc57bdc4b1c162ef87153 100644 (file)
@@ -81,6 +81,7 @@ static void qxl_client_monitors_config_work_func(struct work_struct *work)
 
 int qxl_irq_init(struct qxl_device *qdev)
 {
+       struct pci_dev *pdev = to_pci_dev(qdev->ddev.dev);
        int ret;
 
        init_waitqueue_head(&qdev->display_event);
@@ -93,7 +94,7 @@ int qxl_irq_init(struct qxl_device *qdev)
        atomic_set(&qdev->irq_received_cursor, 0);
        atomic_set(&qdev->irq_received_io_cmd, 0);
        qdev->irq_received_error = 0;
-       ret = drm_irq_install(&qdev->ddev, qdev->ddev.pdev->irq);
+       ret = drm_irq_install(&qdev->ddev, pdev->irq);
        qdev->ram_header->int_mask = QXL_INTERRUPT_MASK;
        if (unlikely(ret != 0)) {
                DRM_ERROR("Failed installing irq: %d\n", ret);
index 228e2b9198f102b16d42869b222d8a6e5b8863d6..4a60a52ab62ee094b2ef00f05eeb248b6525ceb3 100644 (file)
@@ -111,7 +111,6 @@ int qxl_device_init(struct qxl_device *qdev,
 {
        int r, sb;
 
-       qdev->ddev.pdev = pdev;
        pci_set_drvdata(pdev, &qdev->ddev);
 
        mutex_init(&qdev->gem.mutex);