]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/amdgpu: cleanup coding style a bit
authorBernard Zhao <bernard@vivo.com>
Thu, 7 May 2020 09:13:05 +0000 (02:13 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 7 May 2020 20:25:03 +0000 (16:25 -0400)
commitb30df293fd3bb737a6ea54c950f00c6aee31adff
tree64d0ae342666d702db25f9a242ac7c8477daeb03
parent74a94d04830b9b292be080849ed75bcbad2326e1
drm/amd/amdgpu: cleanup coding style a bit

There is DEVICE_ATTR mechanism in separate attribute define.
So this change is to use attr array, also use
sysfs_create_files in init function & sysfs_remove_files in
fini function.
This maybe make the code a bit readable.

Signed-off-by: Bernard Zhao <bernard@vivo.com>
Changes since V1:
*Use DEVICE_ATTR mechanism

Link for V1:
*https://lore.kernel.org/patchwork/patch/1228076/

V2: make array const to fix build errors

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