ALSA: rawmidi: Use rawmidi device file for kernel messages
authorTakashi Iwai <tiwai@suse.de>
Fri, 30 Jan 2015 14:31:52 +0000 (15:31 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 2 Feb 2015 13:42:43 +0000 (14:42 +0100)
... instead of card's device.  This will be helpful to distinguish
errors from multiple rawmidi devices on a single card.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/rawmidi.c

index 932396c81035966bb552b2a4bdd7eb44bd42e78c..bccbf7e375d652affd2934a808893a00060cbf3f 100644 (file)
@@ -57,11 +57,11 @@ static LIST_HEAD(snd_rawmidi_devices);
 static DEFINE_MUTEX(register_mutex);
 
 #define rmidi_err(rmidi, fmt, args...) \
-       dev_err((rmidi)->card->dev, fmt, ##args)
+       dev_err(&(rmidi)->dev, fmt, ##args)
 #define rmidi_warn(rmidi, fmt, args...) \
-       dev_warn((rmidi)->card->dev, fmt, ##args)
+       dev_warn(&(rmidi)->dev, fmt, ##args)
 #define rmidi_dbg(rmidi, fmt, args...) \
-       dev_dbg((rmidi)->card->dev, fmt, ##args)
+       dev_dbg(&(rmidi)->dev, fmt, ##args)
 
 static struct snd_rawmidi *snd_rawmidi_search(struct snd_card *card, int device)
 {