summaryrefslogtreecommitdiffstats
path: root/sound/hda/ext
diff options
context:
space:
mode:
authorRakesh Ughreja <rakesh.a.ughreja@intel.com>2018-06-01 22:53:49 -0500
committerTakashi Iwai <tiwai@suse.de>2018-06-28 07:33:29 +0200
commit3787a39852b0d6a9e67336f8fb5815c13ab78bb6 (patch)
treeb8ec55865d7cfc994d2cc963b9c58490c550079a /sound/hda/ext
parentce397d215ccd07b8ae3f71db689aedb85d56ab40 (diff)
downloadlinux-3787a39852b0d6a9e67336f8fb5815c13ab78bb6.tar.bz2
ALSA: hdac: Remove usage of struct hdac_ext_device and use hdac_device instead
This patch removes the hdac_ext_device structure. The legacy and enhanced HDaudio capabilities can be handled in a backward-compatible way without separate definitions. Follow-up patches in this series handle the bus and driver definitions. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda/ext')
-rw-r--r--sound/hda/ext/hdac_ext_bus.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/sound/hda/ext/hdac_ext_bus.c b/sound/hda/ext/hdac_ext_bus.c
index 0daf31383084..0e4823fdd411 100644
--- a/sound/hda/ext/hdac_ext_bus.c
+++ b/sound/hda/ext/hdac_ext_bus.c
@@ -137,17 +137,16 @@ static void default_release(struct device *dev)
*/
int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *ebus, int addr)
{
- struct hdac_ext_device *edev;
struct hdac_device *hdev = NULL;
struct hdac_bus *bus = ebus_to_hbus(ebus);
char name[15];
int ret;
- edev = kzalloc(sizeof(*edev), GFP_KERNEL);
- if (!edev)
+ hdev = kzalloc(sizeof(*hdev), GFP_KERNEL);
+ if (!hdev)
return -ENOMEM;
- hdev = &edev->hdev;
- edev->ebus = ebus;
+
+ hdev->bus = bus;
snprintf(name, sizeof(name), "ehdaudio%dD%d", ebus->idx, addr);
@@ -176,10 +175,8 @@ EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_init);
*/
void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev)
{
- struct hdac_ext_device *edev = to_ehdac_device(hdev);
-
snd_hdac_device_exit(hdev);
- kfree(edev);
+ kfree(hdev);
}
EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_exit);
@@ -212,27 +209,25 @@ static inline struct hdac_ext_driver *get_edrv(struct device *dev)
return edrv;
}
-static inline struct hdac_ext_device *get_edev(struct device *dev)
+static inline struct hdac_device *get_hdev(struct device *dev)
{
struct hdac_device *hdev = dev_to_hdac_dev(dev);
- struct hdac_ext_device *edev = to_ehdac_device(hdev);
-
- return edev;
+ return hdev;
}
static int hda_ext_drv_probe(struct device *dev)
{
- return (get_edrv(dev))->probe(get_edev(dev));
+ return (get_edrv(dev))->probe(get_hdev(dev));
}
static int hdac_ext_drv_remove(struct device *dev)
{
- return (get_edrv(dev))->remove(get_edev(dev));
+ return (get_edrv(dev))->remove(get_hdev(dev));
}
static void hdac_ext_drv_shutdown(struct device *dev)
{
- return (get_edrv(dev))->shutdown(get_edev(dev));
+ return (get_edrv(dev))->shutdown(get_hdev(dev));
}
/**