summaryrefslogtreecommitdiff
path: root/sound/ac97
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2024-01-03 11:25:38 +0100
committerTakashi Iwai <tiwai@suse.de>2024-01-03 11:47:04 +0100
commitf90dffdce70ff724f9ee8b0bcc711e86e6663896 (patch)
treedd6beb284b996d0efdfbff9810ef9bc2cfe9a625 /sound/ac97
parentcca28db5c6b77fa6988f9189072c5e6b82bc70ad (diff)
ALSA: ac97: fix build regression
The ac97_bus_type structure is no longer declared in this file: sound/ac97/bus.c: In function 'ac97_codec_add': sound/ac97/bus.c:112:27: error: 'ac97_bus_type' undeclared (first use in this function); did you mean 'bus_type'? 112 | codec->dev.bus = &ac97_bus_type; | ^~~~~~~~~~~~~ | bus_type sound/ac97/bus.c:112:27: note: each undeclared identifier is reported only once for each function it appears in sound/ac97/bus.c: In function 'snd_ac97_codec_driver_register': sound/ac97/bus.c:191:28: error: 'ac97_bus_type' undeclared (first use in this function); did you mean 'ac97_bus_reset'? 191 | drv->driver.bus = &ac97_bus_type; Include the header that contains the declaration and make sure the definition is const but not static. Fixes: 66e82d219924 ("ALSA: mark all struct bus_type as const") Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20240103102544.3715055-1-arnd@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/ac97')
-rw-r--r--sound/ac97/bus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c
index 1dc7965eb14b..5e46b972a3da 100644
--- a/sound/ac97/bus.c
+++ b/sound/ac97/bus.c
@@ -15,6 +15,7 @@
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
+#include <sound/ac97_codec.h>
#include <sound/ac97/codec.h>
#include <sound/ac97/controller.h>
#include <sound/ac97/regs.h>
@@ -529,7 +530,7 @@ static void ac97_bus_remove(struct device *dev)
pm_runtime_disable(dev);
}
-static struct bus_type ac97_bus_type = {
+const struct bus_type ac97_bus_type = {
.name = "ac97bus",
.dev_groups = ac97_dev_groups,
.match = ac97_bus_match,