summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_bind.c4
-rw-r--r--sound/pci/hda/hda_codec.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c
index ad276a9771db..130f672e6f37 100644
--- a/sound/pci/hda/hda_bind.c
+++ b/sound/pci/hda/hda_bind.c
@@ -240,7 +240,7 @@ int snd_hda_codec_configure(struct hda_codec *codec)
else
codec->probe_id = 0;
- err = device_add(hda_codec_dev(codec));
+ err = snd_hdac_device_register(&codec->core);
if (err < 0)
return err;
@@ -262,7 +262,7 @@ int snd_hda_codec_configure(struct hda_codec *codec)
return 0;
error:
- device_del(hda_codec_dev(codec));
+ snd_hdac_device_unregister(&codec->core);
return err;
}
EXPORT_SYMBOL_GPL(snd_hda_codec_configure);
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index ddfc0fbbee23..b162fc40348f 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -967,8 +967,7 @@ static int snd_hda_codec_dev_free(struct snd_device *device)
struct hda_codec *codec = device->device_data;
codec->in_freeing = 1;
- if (device_is_registered(hda_codec_dev(codec)))
- device_del(hda_codec_dev(codec));
+ snd_hdac_device_unregister(&codec->core);
put_device(hda_codec_dev(codec));
return 0;
}
@@ -2182,8 +2181,7 @@ int snd_hda_codec_reset(struct hda_codec *codec)
return -EBUSY;
/* OK, let it free */
- if (device_is_registered(hda_codec_dev(codec)))
- device_del(hda_codec_dev(codec));
+ snd_hdac_device_unregister(&codec->core);
/* allow device access again */
snd_hda_unlock_devices(bus);