diff options
author | Rakesh Ughreja <rakesh.a.ughreja@intel.com> | 2018-06-01 23:53:49 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-06-28 01:33:29 -0400 |
commit | 3787a39852b0d6a9e67336f8fb5815c13ab78bb6 (patch) | |
tree | b8ec55865d7cfc994d2cc963b9c58490c550079a /sound/hda/ext | |
parent | ce397d215ccd07b8ae3f71db689aedb85d56ab40 (diff) |
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.c | 25 |
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) | |||
137 | */ | 137 | */ |
138 | int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *ebus, int addr) | 138 | int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *ebus, int addr) |
139 | { | 139 | { |
140 | struct hdac_ext_device *edev; | ||
141 | struct hdac_device *hdev = NULL; | 140 | struct hdac_device *hdev = NULL; |
142 | struct hdac_bus *bus = ebus_to_hbus(ebus); | 141 | struct hdac_bus *bus = ebus_to_hbus(ebus); |
143 | char name[15]; | 142 | char name[15]; |
144 | int ret; | 143 | int ret; |
145 | 144 | ||
146 | edev = kzalloc(sizeof(*edev), GFP_KERNEL); | 145 | hdev = kzalloc(sizeof(*hdev), GFP_KERNEL); |
147 | if (!edev) | 146 | if (!hdev) |
148 | return -ENOMEM; | 147 | return -ENOMEM; |
149 | hdev = &edev->hdev; | 148 | |
150 | edev->ebus = ebus; | 149 | hdev->bus = bus; |
151 | 150 | ||
152 | snprintf(name, sizeof(name), "ehdaudio%dD%d", ebus->idx, addr); | 151 | snprintf(name, sizeof(name), "ehdaudio%dD%d", ebus->idx, addr); |
153 | 152 | ||
@@ -176,10 +175,8 @@ EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_init); | |||
176 | */ | 175 | */ |
177 | void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev) | 176 | void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev) |
178 | { | 177 | { |
179 | struct hdac_ext_device *edev = to_ehdac_device(hdev); | ||
180 | |||
181 | snd_hdac_device_exit(hdev); | 178 | snd_hdac_device_exit(hdev); |
182 | kfree(edev); | 179 | kfree(hdev); |
183 | } | 180 | } |
184 | EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_exit); | 181 | EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_exit); |
185 | 182 | ||
@@ -212,27 +209,25 @@ static inline struct hdac_ext_driver *get_edrv(struct device *dev) | |||
212 | return edrv; | 209 | return edrv; |
213 | } | 210 | } |
214 | 211 | ||
215 | static inline struct hdac_ext_device *get_edev(struct device *dev) | 212 | static inline struct hdac_device *get_hdev(struct device *dev) |
216 | { | 213 | { |
217 | struct hdac_device *hdev = dev_to_hdac_dev(dev); | 214 | struct hdac_device *hdev = dev_to_hdac_dev(dev); |
218 | struct hdac_ext_device *edev = to_ehdac_device(hdev); | 215 | return hdev; |
219 | |||
220 | return edev; | ||
221 | } | 216 | } |
222 | 217 | ||
223 | static int hda_ext_drv_probe(struct device *dev) | 218 | static int hda_ext_drv_probe(struct device *dev) |
224 | { | 219 | { |
225 | return (get_edrv(dev))->probe(get_edev(dev)); | 220 | return (get_edrv(dev))->probe(get_hdev(dev)); |
226 | } | 221 | } |
227 | 222 | ||
228 | static int hdac_ext_drv_remove(struct device *dev) | 223 | static int hdac_ext_drv_remove(struct device *dev) |
229 | { | 224 | { |
230 | return (get_edrv(dev))->remove(get_edev(dev)); | 225 | return (get_edrv(dev))->remove(get_hdev(dev)); |
231 | } | 226 | } |
232 | 227 | ||
233 | static void hdac_ext_drv_shutdown(struct device *dev) | 228 | static void hdac_ext_drv_shutdown(struct device *dev) |
234 | { | 229 | { |
235 | return (get_edrv(dev))->shutdown(get_edev(dev)); | 230 | return (get_edrv(dev))->shutdown(get_hdev(dev)); |
236 | } | 231 | } |
237 | 232 | ||
238 | /** | 233 | /** |