summaryrefslogtreecommitdiff
path: root/sound/usb/caiaq/midi.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2013-03-03 20:46:22 +0100
committerTakashi Iwai <tiwai@suse.de>2013-03-04 09:57:26 +0100
commitf1f6b8f65ff08afed4532b88de1a3bbea773787f (patch)
tree239b592c8d087738c05d0ebe1d192330d4fa69db /sound/usb/caiaq/midi.c
parent1c8470ce311c6b2b49a71a02961c360d04ed28b2 (diff)
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 <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/caiaq/midi.c')
-rw-r--r--sound/usb/caiaq/midi.c9
1 files changed, 5 insertions, 4 deletions
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 <linux/device.h>
#include <linux/usb.h>
#include <linux/gfp.h>
#include <sound/rawmidi.h>
@@ -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);
}
-