diff options
| author | Andrey Grodzovsky <[email protected]> | 2021-05-12 14:26:40 +0000 |
|---|---|---|
| committer | Andrey Grodzovsky <[email protected]> | 2021-05-20 03:50:27 +0000 |
| commit | 35bba8313b95a5cd074fc910a9c2670b4a1b105d (patch) | |
| tree | bd9caf5d8e3ca8986022ba2793303781a0609c82 /drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | |
| parent | PCI: Add support for dev_groups to struct pci_driver (diff) | |
| download | kernel-35bba8313b95a5cd074fc910a9c2670b4a1b105d.tar.gz kernel-35bba8313b95a5cd074fc910a9c2670b4a1b105d.zip | |
drm/amdgpu: Convert driver sysfs attributes to static attributes
This allows to remove explicit creation and destruction
of those attrs and by this avoids warnings on device
finalizing post physical device extraction.
v5: Use newly added pci_driver.dev_groups directly
Signed-off-by: Andrey Grodzovsky <[email protected]>
Acked-by: Christian König <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 1c6c76c04642..8db0d72e8136 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -1769,6 +1769,18 @@ static struct pci_error_handlers amdgpu_pci_err_handler = { .resume = amdgpu_pci_resume, }; +extern const struct attribute_group amdgpu_vram_mgr_attr_group; +extern const struct attribute_group amdgpu_gtt_mgr_attr_group; +extern const struct attribute_group amdgpu_vbios_version_attr_group; + +static const struct attribute_group *amdgpu_sysfs_groups[] = { + &amdgpu_vram_mgr_attr_group, + &amdgpu_gtt_mgr_attr_group, + &amdgpu_vbios_version_attr_group, + NULL, +}; + + static struct pci_driver amdgpu_kms_pci_driver = { .name = DRIVER_NAME, .id_table = pciidlist, @@ -1777,6 +1789,7 @@ static struct pci_driver amdgpu_kms_pci_driver = { .shutdown = amdgpu_pci_shutdown, .driver.pm = &amdgpu_pm_ops, .err_handler = &amdgpu_pci_err_handler, + .dev_groups = amdgpu_sysfs_groups, }; static int __init amdgpu_init(void) |
