summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-05-22 10:04:40 +0300
committerTakashi Iwai <tiwai@suse.de>2024-05-22 11:10:42 +0300
commitc1a8d5f31b601648603986775ab0ec8305f86122 (patch)
tree4a1af3c94d1405b73e4d58aca0317eae5708aabf /include
parent39381fe7394e5eafac76e7e9367e7351138a29c1 (diff)
downloadlinux-c1a8d5f31b601648603986775ab0ec8305f86122.tar.xz
ALSA: core: Enable proc module when CONFIG_MODULES=y
We used '#ifdef MODULE' for judging whether the system supports the sound module or not, and /proc/asound/modules is created only when '#ifdef MODULE' is true. The check is not really appropriate, though, because the flag means only for the sound core and the drivers are still allowed to be built as modules even if 'MODULE' is not set in sound/core/init.c. For fixing the inconsistency, replace those ifdefs with 'ifdef CONFIG_MODULES'. One place for a NULL module check is rewritten with IS_MODULE(CONFIG_SND) to be more intuitive. It can't be changed to CONFIG_MODULES; otherwise it would hit a WARN_ON() incorrectly. This is a slight behavior change; the modules proc entry appears now no matter whether the sound core is built-in or not as long as modules are enabled on the kernel in general. This can't be avoided due to the nature of kernel builds. Link: https://lore.kernel.org/r/20240520170349.2417900-1-xu.yang_2@nxp.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Xu Yang <xu.yang_2@nxp.com> Link: https://lore.kernel.org/r/20240522070442.17786-2-tiwai@suse.de
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions