]> git.karo-electronics.de Git - linux-beck.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)
commit820cc6cf2c552155ea919e596a85e1f4e5dfa2b5
treee6b75fc3f36ef14fd64d6f311c2f8e8c5391c8c5
parent7e40b80da452770878943edfe7da80f10f8d25da
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