From f1f6b8f65ff08afed4532b88de1a3bbea773787f Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Sun, 3 Mar 2013 20:46:22 +0100 Subject: ALSA: snd-usb-caiaq: switch to dev_*() logging Get rid of the proprietary functions log() and debug() and use the generic dev_*() approach. A macro is needed to cast a cdev to a struct device *. Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai --- sound/usb/caiaq/midi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sound/usb/caiaq/midi.c') diff --git a/sound/usb/caiaq/midi.c b/sound/usb/caiaq/midi.c index 63c5a2caa0ad..2d7588461b33 100644 --- a/sound/usb/caiaq/midi.c +++ b/sound/usb/caiaq/midi.c @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -65,6 +66,7 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *cdev, struct snd_rawmidi_substream *substream) { int len, ret; + struct device *dev = caiaqdev_to_dev(cdev); cdev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE; cdev->midi_out_buf[1] = 0; /* port */ @@ -79,9 +81,9 @@ static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *cdev, ret = usb_submit_urb(&cdev->midi_out_urb, GFP_ATOMIC); if (ret < 0) - log("snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed," - "ret=%d, len=%d\n", - substream, ret, len); + dev_err(dev, + "snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed," + "ret=%d, len=%d\n", substream, ret, len); else cdev->midi_out_active = 1; } @@ -171,4 +173,3 @@ void snd_usb_caiaq_midi_output_done(struct urb* urb) snd_usb_caiaq_midi_send(cdev, cdev->midi_out_substream); } - -- cgit v1.2.3