From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:59939 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756443AbbGPRnQ (ORCPT ); Thu, 16 Jul 2015 13:43:16 -0400 Subject: Patch "ALSA: pcm: Fix pcm_class sysfs output" has been added to the 4.1-stable tree To: tiwai@suse.de, gregkh@linuxfoundation.org Cc: , From: Date: Thu, 16 Jul 2015 10:42:59 -0700 Message-ID: <14370685797265@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled ALSA: pcm: Fix pcm_class sysfs output to the 4.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: alsa-pcm-fix-pcm_class-sysfs-output.patch and it can be found in the queue-4.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 60b93030b44a8c2cd015cebe5624fd7552ec67ec Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 23 Jun 2015 11:56:22 +0200 Subject: ALSA: pcm: Fix pcm_class sysfs output From: Takashi Iwai commit 60b93030b44a8c2cd015cebe5624fd7552ec67ec upstream. The pcm_class sysfs of each PCM substream gives only "none" since the recent code change to embed the struct device. Fix the code to point directly to the embedded device object properly. Fixes: ef46c7af93f9 ('ALSA: pcm: Embed struct device') Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/core/pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -1027,7 +1027,8 @@ void snd_pcm_detach_substream(struct snd static ssize_t show_pcm_class(struct device *dev, struct device_attribute *attr, char *buf) { - struct snd_pcm *pcm; + struct snd_pcm_str *pstr = container_of(dev, struct snd_pcm_str, dev); + struct snd_pcm *pcm = pstr->pcm; const char *str; static const char *strs[SNDRV_PCM_CLASS_LAST + 1] = { [SNDRV_PCM_CLASS_GENERIC] = "generic", @@ -1036,8 +1037,7 @@ static ssize_t show_pcm_class(struct dev [SNDRV_PCM_CLASS_DIGITIZER] = "digitizer", }; - if (! (pcm = dev_get_drvdata(dev)) || - pcm->dev_class > SNDRV_PCM_CLASS_LAST) + if (pcm->dev_class > SNDRV_PCM_CLASS_LAST) str = "none"; else str = strs[pcm->dev_class]; Patches currently in stable-queue which might be from tiwai@suse.de are queue-4.1/alsa-hda-disable-widget-power-save-for-via-codecs.patch queue-4.1/alsa-hda-add-headset-support-to-acer-aspire-v5.patch queue-4.1/alsa-hda-set-proper-caps-for-newer-amd-hda-audio-in-kb-kv.patch queue-4.1/alsa-pcm-fix-pcm_class-sysfs-output.patch queue-4.1/alsa-hda-fix-dock-headphone-on-thinkpad-x250-seen-as-a-line-out.patch queue-4.1/alsa-hda-fix-the-dock-headphone-output-on-fujitsu-lifebook-e780.patch queue-4.1/alsa-hda-restore-the-mic-fixup-for-some-dell-machines.patch queue-4.1/alsa-hda-add-a-fixup-for-dell-e7450.patch