diff options
| author | Thomas Weißschuh <[email protected]> | 2023-02-16 01:07:27 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-02-23 22:35:59 +0000 |
| commit | b2daaa9360610c584fbe8d7d5e8d1fdb99abc7ef (patch) | |
| tree | f594ddb21b4dfe41190eb9c1f21cf1fe3e424d39 /drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | |
| parent | drm/amd/display: Modify mismatched function name (diff) | |
| download | kernel-b2daaa9360610c584fbe8d7d5e8d1fdb99abc7ef.tar.gz kernel-b2daaa9360610c584fbe8d7d5e8d1fdb99abc7ef.zip | |
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 <[email protected]>
Signed-off-by: Thomas Weißschuh <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c index 4340d08f7607..fef1575cd0cf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c @@ -308,7 +308,7 @@ static const struct sysfs_ops amdgpu_xgmi_hive_ops = { .show = amdgpu_xgmi_show_attrs, }; -struct kobj_type amdgpu_xgmi_hive_type = { +static const struct kobj_type amdgpu_xgmi_hive_type = { .release = amdgpu_xgmi_hive_release, .sysfs_ops = &amdgpu_xgmi_hive_ops, .default_groups = amdgpu_xgmi_hive_groups, |
