]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Clear pcm pointer assigned to hda_pcm at device removal
authorTakashi Iwai <tiwai@suse.de>
Fri, 20 Feb 2015 11:50:46 +0000 (12:50 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 26 Feb 2015 14:52:45 +0000 (15:52 +0100)
commit1dd86bc7ffb7d27c59e474770585417b4efa82e0
treee6b75fc3f36ef14fd64d6f311c2f8e8c5391c8c5
parentf5b333505914da8e496d7e443d0318b597b1c280
ALSA: hda - Clear pcm pointer assigned to hda_pcm at device removal

We leave the pcm field of struct hda_pcm at removal of each device, so
far.  This hasn't been a problem since unbinding the codec driver
isn't supposed to happen and another route via snd_hda_codec_reset()
clears all the once.  However, for a proper unbind implementation, we
need to care about it.

This patch does the thing above properly:

- Include struct hda_pcm pointer instead of struct hda_pcm_stream
  pointers in struct azx_dev.  This allows us to point the hda_pcm
  object at dev_free callback.

- Introduce to_hda_pcm_stream() macro for better readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_controller.c
sound/pci/hda/hda_controller.h