ALSA: hda - Make snd_hda_bus_type public
Define the common hd-audio driver and device types to bind over snd_hda_bus_type publicly. This allows to implement other type of device and driver code over hd-audio bus. Now both struct hda_codec and struct hda_codec_driver inherit these new struct hdac_device and struct hdac_driver, respectively. The bus registration is done in subsys_initcall() to assure it before any other driver registrations. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -1294,6 +1294,7 @@ int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
|
||||
dev_set_name(dev, "hdaudioC%dD%d", card->number, codec_addr);
|
||||
dev_set_drvdata(dev, codec); /* for sysfs */
|
||||
device_enable_async_suspend(dev);
|
||||
codec->core.type = HDA_DEV_LEGACY;
|
||||
|
||||
codec->bus = bus;
|
||||
codec->card = card;
|
||||
|
Reference in New Issue
Block a user