• Takashi Iwai's avatar
    ALSA: hda - Clear pcm pointer assigned to hda_pcm at device removal · 820cc6cf
    Takashi Iwai authored
    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: default avatarTakashi Iwai <tiwai@suse.de>
    820cc6cf
hda_controller.c 51.6 KB