aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_pci.c')
-rw-r--r--drivers/gpu/drm/drm_pci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index 1f96cee6eee8..d2758be37a93 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -322,7 +322,7 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
322 322
323 DRM_DEBUG("\n"); 323 DRM_DEBUG("\n");
324 324
325 dev = kzalloc(sizeof(*dev), GFP_KERNEL); 325 dev = drm_dev_alloc(driver, &pdev->dev);
326 if (!dev) 326 if (!dev)
327 return -ENOMEM; 327 return -ENOMEM;
328 328
@@ -331,8 +331,6 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
331 goto err_g1; 331 goto err_g1;
332 332
333 dev->pdev = pdev; 333 dev->pdev = pdev;
334 dev->dev = &pdev->dev;
335
336 dev->pci_device = pdev->device; 334 dev->pci_device = pdev->device;
337 dev->pci_vendor = pdev->vendor; 335 dev->pci_vendor = pdev->vendor;
338 336