Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: hda: Remove codec init and exit routines

There are no users for snd_hdac_ext_bus_device_init() and
snd_hdac_ext_bus_device_exit().

While at it, remove hdac_to_hda_priv() too for the exact same reason.

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220816111727.3218543-6-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Cezary Rojewski and committed by
Takashi Iwai
fb598784 0c5c29ca

-58
-2
include/sound/hda_codec.h
··· 293 293 #define dev_to_hda_codec(_dev) container_of(_dev, struct hda_codec, core.dev) 294 294 #define hda_codec_dev(_dev) (&(_dev)->core.dev) 295 295 296 - #define hdac_to_hda_priv(_hdac) \ 297 - container_of(_hdac, struct hdac_hda_priv, codec.core) 298 296 #define hdac_to_hda_codec(_hdac) container_of(_hdac, struct hda_codec, core) 299 297 300 298 #define list_for_each_codec(c, bus) \
-3
include/sound/hdaudio_ext.h
··· 11 11 const struct hdac_ext_bus_ops *ext_ops); 12 12 13 13 void snd_hdac_ext_bus_exit(struct hdac_bus *bus); 14 - int snd_hdac_ext_bus_device_init(struct hdac_bus *bus, int addr, 15 - struct hdac_device *hdev, int type); 16 - void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev); 17 14 void snd_hdac_ext_bus_device_remove(struct hdac_bus *bus); 18 15 19 16 #define HDA_CODEC_REV_EXT_ENTRY(_vid, _rev, _name, drv_data) \
-53
sound/hda/ext/hdac_ext_bus.c
··· 60 60 } 61 61 EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_exit); 62 62 63 - static void default_release(struct device *dev) 64 - { 65 - snd_hdac_ext_bus_device_exit(dev_to_hdac_dev(dev)); 66 - } 67 - 68 - /** 69 - * snd_hdac_ext_bus_device_init - initialize the HDA extended codec base device 70 - * @bus: hdac bus to attach to 71 - * @addr: codec address 72 - * @hdev: hdac device to init 73 - * @type: codec type (HDAC_DEV_*) to use for this device 74 - * 75 - * Returns zero for success or a negative error code. 76 - */ 77 - int snd_hdac_ext_bus_device_init(struct hdac_bus *bus, int addr, 78 - struct hdac_device *hdev, int type) 79 - { 80 - char name[15]; 81 - int ret; 82 - 83 - hdev->bus = bus; 84 - 85 - snprintf(name, sizeof(name), "ehdaudio%dD%d", bus->idx, addr); 86 - 87 - ret = snd_hdac_device_init(hdev, bus, name, addr); 88 - if (ret < 0) { 89 - dev_err(bus->dev, "device init failed for hdac device\n"); 90 - return ret; 91 - } 92 - hdev->type = type; 93 - hdev->dev.release = default_release; 94 - 95 - ret = snd_hdac_device_register(hdev); 96 - if (ret) { 97 - dev_err(bus->dev, "failed to register hdac device\n"); 98 - snd_hdac_ext_bus_device_exit(hdev); 99 - return ret; 100 - } 101 - 102 - return 0; 103 - } 104 - EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_init); 105 - 106 - /** 107 - * snd_hdac_ext_bus_device_exit - clean up a HD-audio extended codec base device 108 - * @hdev: hdac device to clean up 109 - */ 110 - void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev) 111 - { 112 - snd_hdac_device_exit(hdev); 113 - } 114 - EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_exit); 115 - 116 63 /** 117 64 * snd_hdac_ext_bus_device_remove - remove HD-audio extended codec base devices 118 65 *