From: <gregkh@linuxfoundation.org>
To: tiwai@suse.de, gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "ALSA: pcm: Fix pcm_class sysfs output" has been added to the 4.1-stable tree
Date: Thu, 16 Jul 2015 10:42:59 -0700 [thread overview]
Message-ID: <14370685797265@kroah.com> (raw)
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 <stable@vger.kernel.org> know about it.
>From 60b93030b44a8c2cd015cebe5624fd7552ec67ec Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 23 Jun 2015 11:56:22 +0200
Subject: ALSA: pcm: Fix pcm_class sysfs output
From: Takashi Iwai <tiwai@suse.de>
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 <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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
reply other threads:[~2015-07-16 17:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14370685797265@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.