diff options
author | Arnd Bergmann <[email protected]> | 2023-06-16 11:00:37 +0200 |
---|---|---|
committer | Mark Brown <[email protected]> | 2023-06-16 12:56:06 +0100 |
commit | 0c340ba05fda0fbf5a54207452728911c6388330 (patch) | |
tree | 8f578b5c4c0e40fd68ac674f6274ae7f87ad4042 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | fadccca8f33959857948e279045a3757b5f21d55 (diff) |
ASoC: max98388: fix unused function warnings
The PM functions are never referenced when CONFIG_PM_SLEEP is
disabled:
sound/soc/codecs/max98388.c:854:12: error: unused function 'max98388_suspend' [-Werror,-Wunused-function]
static int max98388_suspend(struct device *dev)
^
sound/soc/codecs/max98388.c:864:12: error: unused function 'max98388_resume' [-Werror,-Wunused-function]
static int max98388_resume(struct device *dev)
Fix this by using the modern SYSTEM_SLEEP_PM_OPS() macro in place of
the deprecated SET_SYSTEM_SLEEP_PM_OPS() version, and use pm_sleep_ptr()
to hide the entire structure as well.
On a related note, the of_match_ptr() and ACPI_PTR() macros have the same
problem and would cause the device id table to be unused when the driver
is built-in and the respective subsystems are disabled. This does not
cause warnings unless -Wunused-const-variable is passed to the compiler,
but it's better to just not use the macros at all here.
Signed-off-by: Arnd Bergmann <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions