4 #include <linux/init.h>
5 #include <linux/device.h>
6 #include <linux/module.h>
7 #include <linux/export.h>
8 #include <sound/hdaudio.h>
10 MODULE_DESCRIPTION("HD-audio bus");
11 MODULE_LICENSE("GPL");
13 static int hda_bus_match(struct device *dev, struct device_driver *drv)
15 struct hdac_device *hdev = dev_to_hdac_dev(dev);
16 struct hdac_driver *hdrv = drv_to_hdac_driver(drv);
18 if (hdev->type != hdrv->type)
21 return hdrv->match(hdev, hdrv);
25 struct bus_type snd_hda_bus_type = {
27 .match = hda_bus_match,
29 EXPORT_SYMBOL_GPL(snd_hda_bus_type);
31 static int __init hda_bus_init(void)
33 return bus_register(&snd_hda_bus_type);
36 static void __exit hda_bus_exit(void)
38 bus_unregister(&snd_hda_bus_type);
41 subsys_initcall(hda_bus_init);
42 module_exit(hda_bus_exit);