Skip to content

Commit f90dffd

Browse files
arndbtiwai
authored andcommitted
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: 66e82d2 ("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>
1 parent cca28db commit f90dffd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sound/ac97/bus.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/pm_runtime.h>
1616
#include <linux/slab.h>
1717
#include <linux/sysfs.h>
18+
#include <sound/ac97_codec.h>
1819
#include <sound/ac97/codec.h>
1920
#include <sound/ac97/controller.h>
2021
#include <sound/ac97/regs.h>
@@ -529,7 +530,7 @@ static void ac97_bus_remove(struct device *dev)
529530
pm_runtime_disable(dev);
530531
}
531532

532-
static struct bus_type ac97_bus_type = {
533+
const struct bus_type ac97_bus_type = {
533534
.name = "ac97bus",
534535
.dev_groups = ac97_dev_groups,
535536
.match = ac97_bus_match,

0 commit comments

Comments
 (0)