summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-17 13:56:29 +0100
committerTakashi Iwai <tiwai@suse.de>2015-02-17 14:23:57 +0100
commitef7449780ebb596b47d5019eb7ba7878c30a3404 (patch)
tree1eb413a617ebca8e9e81cc2080208cdba3e5a32b /sound/pci/hda/hda_codec.c
parent9fd37810daa56b8c0a8d51565216c95220889e62 (diff)
downloadblackbird-op-linux-ef7449780ebb596b47d5019eb7ba7878c30a3404.tar.gz
blackbird-op-linux-ef7449780ebb596b47d5019eb7ba7878c30a3404.zip
ALSA: hda - Drop hda_bus_template for snd_hda_bus_new()
Instead of copying from the given template, let the caller fills the fields after creation. This simplifies the code after all. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 2fe86d2e1b09..215bf048c668 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -861,14 +861,12 @@ static int snd_hda_bus_dev_disconnect(struct snd_device *device)
/**
* snd_hda_bus_new - create a HDA bus
* @card: the card entry
- * @temp: the template for hda_bus information
* @busp: the pointer to store the created bus instance
*
* Returns 0 if successful, or a negative error code.
*/
int snd_hda_bus_new(struct snd_card *card,
- const struct hda_bus_template *temp,
- struct hda_bus **busp)
+ struct hda_bus **busp)
{
struct hda_bus *bus;
int err;
@@ -877,11 +875,6 @@ int snd_hda_bus_new(struct snd_card *card,
.dev_free = snd_hda_bus_dev_free,
};
- if (snd_BUG_ON(!temp))
- return -EINVAL;
- if (snd_BUG_ON(!temp->ops.command || !temp->ops.get_response))
- return -EINVAL;
-
if (busp)
*busp = NULL;
@@ -892,12 +885,6 @@ int snd_hda_bus_new(struct snd_card *card,
}
bus->card = card;
- bus->private_data = temp->private_data;
- bus->pci = temp->pci;
- bus->modelname = temp->modelname;
- bus->power_save = temp->power_save;
- bus->ops = temp->ops;
-
mutex_init(&bus->cmd_mutex);
mutex_init(&bus->prepare_mutex);
INIT_LIST_HEAD(&bus->codec_list);
OpenPOWER on IntegriCloud