drm/amdkfd: make kfd_class constant
authorRicardo B. Marliere <ricardo@marliere.net>
Tue, 5 Mar 2024 12:15:14 +0000 (09:15 -0300)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Mar 2024 20:24:50 +0000 (15:24 -0500)
commit6d3b27e046abe09a1cc676e486433628d9849bd0
tree09e74b518c86a8df9cab5c79c28bf5cc420720ac
parent5e592956cc36abd2e568245dcf12b36c85d9462d
drm/amdkfd: make kfd_class constant

Since commit 43a7206b0963 ("driver core: class: make class_register() take
a const *"), the driver core allows for struct class to be in read-only
memory, so move the kfd_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c