[PATCH] drm: Remove unused branch in legacy PCI initialization

Thomas Zimmermann tzimmermann at suse.de
Sun May 16 19:19:18 UTC 2021


The legacy PCI init code sets the drvdata for drivers with MODESET
flag, but none of the old UMS drivers sets the flag. Remove the branch.

Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
---
 drivers/gpu/drm/drm_pci.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index 38c3cb72e7e6..f508f70e7a3f 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -165,9 +165,6 @@ static int drm_legacy_get_pci_dev(struct pci_dev *pdev,
 	dev->hose = pdev->sysdata;
 #endif
 
-	if (drm_core_check_feature(dev, DRIVER_MODESET))
-		pci_set_drvdata(pdev, dev);
-
 	drm_legacy_pci_agp_init(dev);
 
 	ret = drm_dev_register(dev, ent->driver_data);
-- 
2.31.1



More information about the dri-devel mailing list