summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-17 23:46:37 +0300
committerTakashi Iwai <tiwai@suse.de>2015-03-23 15:15:51 +0300
commite3d280fc6d42017b2379503fbda83655a05294fe (patch)
treecc89c4b22054d620163f0d6bdad901f43957dbf5 /sound/pci/hda/hda_codec.h
parent3372dbdd8ca11f51be8c6a30b2bc79eb04c4a902 (diff)
downloadlinux-e3d280fc6d42017b2379503fbda83655a05294fe.tar.xz
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>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index ccf355d4a8fa..31a9e10e5137 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -26,6 +26,7 @@
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/hwdep.h>
+#include <sound/hdaudio.h>
#include <sound/hda_verbs.h>
/*
@@ -172,7 +173,7 @@ struct hda_codec_preset {
#define HDA_CODEC_ID_GENERIC 0x00000201
struct hda_codec_driver {
- struct device_driver driver;
+ struct hdac_driver core;
const struct hda_codec_preset *preset;
};
@@ -276,7 +277,7 @@ struct hda_pcm {
/* codec information */
struct hda_codec {
- struct device dev;
+ struct hdac_device core;
struct hda_bus *bus;
struct snd_card *card;
unsigned int addr; /* codec addr*/
@@ -409,10 +410,8 @@ struct hda_codec {
struct snd_array verbs;
};
-#define dev_to_hda_codec(_dev) container_of(_dev, struct hda_codec, dev)
-#define hda_codec_dev(_dev) (&(_dev)->dev)
-
-extern struct bus_type snd_hda_bus_type;
+#define dev_to_hda_codec(_dev) container_of(_dev, struct hda_codec, core.dev)
+#define hda_codec_dev(_dev) (&(_dev)->core.dev)
/* direction */
enum {