[PATCH 3/4] drm: qxl: Drop duplicated pci_device pointer attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



qxl_device duplicates the pointer to struct pci_dev, which is not
needed since we already have it in the drm_device structure.  Clean it
up.

Signed-off-by: Gabriel Krisman Bertazi <krisman@xxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/qxl/qxl_drv.h   | 1 -
 drivers/gpu/drm/qxl/qxl_ioctl.c | 2 +-
 drivers/gpu/drm/qxl/qxl_kms.c   | 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index a022de205134..05a96dde1916 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -243,7 +243,6 @@ struct qxl_device;
 
 struct qxl_device {
 	struct drm_device		*ddev;
-	struct pci_dev			*pdev;
 	unsigned long flags;
 
 	resource_size_t vram_base, vram_size;
diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c
index 5a4c8c492683..7ad5070f2550 100644
--- a/drivers/gpu/drm/qxl/qxl_ioctl.c
+++ b/drivers/gpu/drm/qxl/qxl_ioctl.c
@@ -375,7 +375,7 @@ static int qxl_clientcap_ioctl(struct drm_device *dev, void *data,
 	byte = param->index / 8;
 	idx = param->index % 8;
 
-	if (qdev->pdev->revision < 4)
+	if (dev->pdev->revision < 4)
 		return -ENOSYS;
 
 	if (byte >= 58)
diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c
index 7632e38493fc..52d1bc1bb0ca 100644
--- a/drivers/gpu/drm/qxl/qxl_kms.c
+++ b/drivers/gpu/drm/qxl/qxl_kms.c
@@ -123,7 +123,6 @@ int qxl_device_init(struct qxl_device *qdev,
 	int r, sb;
 
 	qdev->ddev = ddev;
-	qdev->pdev = pdev;
 	qdev->flags = flags;
 
 	mutex_init(&qdev->gem.mutex);
-- 
2.11.0

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux