Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kazuki Oikawa <k@oikw.org>
To: alsa-devel@alsa-project.org
Cc: Kazuki Oikawa <k@oikw.org>
Subject: [PATCH] ALSA: usb-audio: Fix quirks code is not called
Date: Mon, 18 Jul 2016 01:16:15 +0900	[thread overview]
Message-ID: <20160717161615.2399-1-k@oikw.org> (raw)

snd_usb_{set_interface,ctl_msg}_quirk checks chip->usb_id to need
calling a quirks code. But existed code path that not calling
dev_set_drvdata in usb_audio_probe.

Signed-off-by: Kazuki Oikawa <k@oikw.org>
Fixes: 79289e24194a ("ALSA: usb-audio: Refer to chip->usb_id for quirks and MIDI creation")
---
 sound/usb/card.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/card.c b/sound/usb/card.c
index 3fc63583a537..2d493501b7f6 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -552,7 +552,6 @@ static int usb_audio_probe(struct usb_interface *intf,
 				goto __error;
 			}
 			chip = usb_chip[i];
-			dev_set_drvdata(&dev->dev, chip);
 			atomic_inc(&chip->active); /* avoid autopm */
 			break;
 		}
@@ -578,6 +577,7 @@ static int usb_audio_probe(struct usb_interface *intf,
 			goto __error;
 		}
 	}
+	dev_set_drvdata(&dev->dev, chip);
 
 	/*
 	 * For devices with more than one control interface, we assume the
-- 
2.9.2

             reply	other threads:[~2016-07-17 16:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-17 16:16 Kazuki Oikawa [this message]
2016-07-18  5:35 ` [PATCH] ALSA: usb-audio: Fix quirks code is not called Takashi Sakamoto
2016-07-18 10:35 ` Takashi Iwai

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=20160717161615.2399-1-k@oikw.org \
    --to=k@oikw.org \
    --cc=alsa-devel@alsa-project.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox