OSDN Git Service

sound/oss/dmasound: fix build when drivers are mixed =y/=m
authorRandy Dunlap <rdunlap@infradead.org>
Tue, 5 Apr 2022 23:41:18 +0000 (16:41 -0700)
committerTakashi Iwai <tiwai@suse.de>
Thu, 7 Apr 2022 08:28:48 +0000 (10:28 +0200)
commit9dd7c46346ca4390f84a7ea9933005eb1b175c15
treead462a3dffb1d4d8e66753eec57811609b73a9d8
parent9eb6f5c388060d8cef3c8b616cc31b765e022359
sound/oss/dmasound: fix build when drivers are mixed =y/=m

When CONFIG_DMASOUND_ATARI=m and CONFIG_DMASOUND_Q40=y (or vice versa),
dmasound_core.o can be built without dmasound_deinit() being defined,
causing a build error:

ERROR: modpost: "dmasound_deinit" [sound/oss/dmasound/dmasound_atari.ko] undefined!

Modify dmasound_core.c and dmasound.h so that dmasound_deinit() is
always available.

The mixed modes (=y/=m) also mean that several variables and structs
have to be declared in all cases.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: lore.kernel.org/r/202204032138.EFT9qGEd-lkp@intel.com
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20220405234118.24830-1-rdunlap@infradead.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/oss/dmasound/dmasound.h
sound/oss/dmasound/dmasound_core.c