On Mon, Nov 19, 2018 at 10:22 AM Rex Zhu <Rex.Zhu@xxxxxxx> wrote: > > The static struct drm_driver *driver was > not used because drm_pci_init was deprecated > > v2: Remove static pointer pdriver > > Reviewed-by: Christian König <christian.koenig@xxxxxxx> > Signed-off-by: Rex Zhu <Rex.Zhu@xxxxxxx> Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > index 3b7d511..f3344c5a 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > @@ -1235,9 +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 = { > .name = DRIVER_NAME, > .id_table = pciidlist, > @@ -1267,16 +1264,14 @@ 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. */ > amdgpu_amdkfd_init(); > > /* let modprobe override vga console setting */ > - return pci_register_driver(pdriver); > + return pci_register_driver(&amdgpu_kms_pci_driver); > > error_fence: > amdgpu_sync_fini(); > @@ -1288,7 +1283,7 @@ static int __init amdgpu_init(void) > static void __exit amdgpu_exit(void) > { > amdgpu_amdkfd_fini(); > - pci_unregister_driver(pdriver); > + pci_unregister_driver(&amdgpu_kms_pci_driver); > amdgpu_unregister_atpx_handler(); > amdgpu_sync_fini(); > amdgpu_fence_slab_fini(); > -- > 1.9.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx