diff options
author | Greg Kroah-Hartman <[email protected]> | 2022-12-05 13:12:06 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2022-12-06 16:55:25 +0100 |
commit | 47446b50ad2549af4fcc93f82a148ab107e6ef6a (patch) | |
tree | 809cc16f9787b8bbb7d5c921884b3cfc98283956 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |
parent | c3da679286bee1d897bb24a804cca4ff58781bec (diff) |
firmware_loader: fix up to_fw_sysfs() to preserve const
to_fw_sysfs() was changed in commit 23680f0b7d7f ("driver core: make
struct class.dev_uevent() take a const *") to pass in a const pointer
but not pass it back out to handle some changes in the driver core.
That isn't the best idea as it could cause problems if used incorrectly,
so switch to use the container_of_const() macro instead which will
preserve the const status of the pointer and enforce it by the compiler.
Fixes: 23680f0b7d7f ("driver core: make struct class.dev_uevent() take a const *")
Cc: Luis Chamberlain <[email protected]>
Reviewed-by: Sakari Ailus <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Acked-by: Russ Weight <[email protected]>
Acked-by: Rafael J. Wysocki <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions