[PATCH] drm/amdgpu: Remove dead static variable

Rex Zhu Rex.Zhu at amd.com
Mon Nov 19 11:07:40 UTC 2018


The static struct drm_driver *driver was
not used because drm_pci_init was deprecated

Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 3b7d511..fa33e31 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1235,7 +1235,6 @@ static int amdgpu_flush(struct file *f, fl_owner_t id)
 	.patchlevel = KMS_DRIVER_PATCHLEVEL,
 };
 
-static struct drm_driver *driver;
 static struct pci_driver *pdriver;
 
 static struct pci_driver amdgpu_kms_pci_driver = {
@@ -1267,9 +1266,8 @@ static int __init amdgpu_init(void)
 		goto error_fence;
 
 	DRM_INFO("amdgpu kernel modesetting enabled.\n");
-	driver = &kms_driver;
 	pdriver = &amdgpu_kms_pci_driver;
-	driver->num_ioctls = amdgpu_max_kms_ioctl;
+	kms_driver.num_ioctls = amdgpu_max_kms_ioctl;
 	amdgpu_register_atpx_handler();
 
 	/* Ignore KFD init failures. Normal when CONFIG_HSA_AMD is not set. */
-- 
1.9.1



More information about the amd-gfx mailing list