drm/amdgpu: call pci_[un]register_driver() directly
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 2 Jun 2017 20:52:08 +0000 (16:52 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 8 Jun 2017 14:54:38 +0000 (10:54 -0400)
Rather than calling the deprecated drm_pci_init() and
drm_pci_exit() which just wrapped the pci functions
anyway.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

index 428363ff8c199acacc374d0a8265541072bbe69b..82efdcae30b7488f920396db1244be1c94a40534 100644 (file)
@@ -842,7 +842,7 @@ static int __init amdgpu_init(void)
        driver->num_ioctls = amdgpu_max_kms_ioctl;
        amdgpu_register_atpx_handler();
        /* let modprobe override vga console setting */
-       return drm_pci_init(driver, pdriver);
+       return pci_register_driver(pdriver);
 
 error_sched:
        amdgpu_fence_slab_fini();
@@ -857,7 +857,7 @@ error_sync:
 static void __exit amdgpu_exit(void)
 {
        amdgpu_amdkfd_fini();
-       drm_pci_exit(driver, pdriver);
+       pci_unregister_driver(pdriver);
        amdgpu_unregister_atpx_handler();
        amdgpu_sync_fini();
        amd_sched_fence_slab_fini();