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.0-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.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 60b93030b44a8c2cd015cebe5624fd7552ec67ec Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
Date: Tue, 23 Jun 2015 11:56:22 +0200
Subject: ALSA: pcm: Fix pcm_class sysfs output

From: Takashi Iwai <[email protected]>

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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 sound/core/pcm.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -1044,7 +1044,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",
@@ -1053,8 +1054,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 [email protected] are

queue-4.0/alsa-hda-add-headset-support-to-acer-aspire-v5.patch
queue-4.0/alsa-hda-set-proper-caps-for-newer-amd-hda-audio-in-kb-kv.patch
queue-4.0/alsa-pcm-fix-pcm_class-sysfs-output.patch
queue-4.0/alsa-hda-fix-dock-headphone-on-thinkpad-x250-seen-as-a-line-out.patch
queue-4.0/alsa-hda-fix-the-dock-headphone-output-on-fujitsu-lifebook-e780.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to