aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-01-24 09:45:36 +0100
committerTakashi Iwai <tiwai@suse.de>2019-01-29 18:28:09 +0100
commit45571bb871b217f1031045a27d935ea7c6ea5d12 (patch)
treeafe743bfa29172c521d396e9e146dc95051b9fd2 /sound/pci/hda/hda_codec.c
parentMerge branch 'topic/hda-pm-state' into for-next (diff)
downloadlinux-dev-45571bb871b217f1031045a27d935ea7c6ea5d12.tar.xz
linux-dev-45571bb871b217f1031045a27d935ea7c6ea5d12.zip
ALSA: hda - Use standard device registration for beep
Currently the registration and free of beep input device was done manually from the register and the disconnect callbacks of the assigned codec object. This seems working in most cases, but this may be a cause of some races at probe. Moreover, due to these manual calls, the total code became unnecessarily lengthy. This patch rewrites the beep registration code to follow the standard sound device object style. This allows us reducing the code, in addition to avoiding the nested device registration calls. 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.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index dc7b342f00ef..5f2005098a60 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -813,7 +813,6 @@ void snd_hda_codec_register(struct hda_codec *codec)
if (codec->registered)
return;
if (device_is_registered(hda_codec_dev(codec))) {
- snd_hda_register_beep_device(codec);
codec_display_power(codec, true);
pm_runtime_enable(hda_codec_dev(codec));
/* it was powered up in snd_hda_codec_new(), now all done */
@@ -828,14 +827,6 @@ static int snd_hda_codec_dev_register(struct snd_device *device)
return 0;
}
-static int snd_hda_codec_dev_disconnect(struct snd_device *device)
-{
- struct hda_codec *codec = device->device_data;
-
- snd_hda_detach_beep_device(codec);
- return 0;
-}
-
static int snd_hda_codec_dev_free(struct snd_device *device)
{
struct hda_codec *codec = device->device_data;
@@ -921,7 +912,6 @@ int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card,
int err;
static struct snd_device_ops dev_ops = {
.dev_register = snd_hda_codec_dev_register,
- .dev_disconnect = snd_hda_codec_dev_disconnect,
.dev_free = snd_hda_codec_dev_free,
};