OSDN Git Service

drm/amdgpu: make kobj_type structures constant
authorThomas Weißschuh <linux@weissschuh.net>
Thu, 16 Feb 2023 01:07:27 +0000 (01:07 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 23 Feb 2023 22:35:59 +0000 (17:35 -0500)
commitb2daaa9360610c584fbe8d7d5e8d1fdb99abc7ef
treef594ddb21b4dfe41190eb9c1f21cf1fe3e424d39
parent28d58468ad7d9630c83e4ab3dcc0b2953a276f7e
drm/amdgpu: make kobj_type structures constant

Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.")
the driver core allows the usage of const struct kobj_type.

Take advantage of this to constify the structure definitions to prevent
modification at runtime.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c