summaryrefslogtreecommitdiff
path: root/sound/usb/usx2y/usX2Yhwdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/usx2y/usX2Yhwdep.c')
-rw-r--r--sound/usb/usx2y/usX2Yhwdep.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/sound/usb/usx2y/usX2Yhwdep.c b/sound/usb/usx2y/usX2Yhwdep.c
index 4937ede0b5d7..9fd6a86cc08e 100644
--- a/sound/usb/usx2y/usX2Yhwdep.c
+++ b/sound/usb/usx2y/usX2Yhwdep.c
@@ -24,19 +24,12 @@ static vm_fault_t snd_us428ctls_vm_fault(struct vm_fault *vmf)
struct page *page;
void *vaddr;
- snd_printdd("ENTER, start %lXh, pgoff %ld\n",
- vmf->vma->vm_start,
- vmf->pgoff);
-
offset = vmf->pgoff << PAGE_SHIFT;
vaddr = (char *)((struct usx2ydev *)vmf->vma->vm_private_data)->us428ctls_sharedmem + offset;
page = virt_to_page(vaddr);
get_page(page);
vmf->page = page;
- snd_printdd("vaddr=%p made us428ctls_vm_fault() page %p\n",
- vaddr, page);
-
return 0;
}
@@ -56,7 +49,8 @@ static int snd_us428ctls_mmap(struct snd_hwdep *hw, struct file *filp, struct vm
/* if userspace tries to mmap beyond end of our buffer, fail */
if (size > US428_SHAREDMEM_PAGES) {
- snd_printd("%lu > %lu\n", size, (unsigned long)US428_SHAREDMEM_PAGES);
+ dev_dbg(hw->card->dev, "%s: mmap size %lu > %lu\n", __func__,
+ size, (unsigned long)US428_SHAREDMEM_PAGES);
return -EINVAL;
}
@@ -150,7 +144,6 @@ static int usx2y_create_usbmidi(struct snd_card *card)
le16_to_cpu(dev->descriptor.idProduct) == USB_ID_US428 ?
&quirk_2 : &quirk_1;
- snd_printdd("%s\n", __func__);
return snd_usbmidi_create(card, iface, &usx2y(card)->midi_list, quirk);
}
@@ -160,7 +153,8 @@ static int usx2y_create_alsa_devices(struct snd_card *card)
err = usx2y_create_usbmidi(card);
if (err < 0) {
- snd_printk(KERN_ERR "%s: usx2y_create_usbmidi error %i\n", __func__, err);
+ dev_err(card->dev, "%s: usx2y_create_usbmidi error %i\n",
+ __func__, err);
return err;
}
err = usx2y_audio_create(card);
@@ -183,15 +177,13 @@ static int snd_usx2y_hwdep_dsp_load(struct snd_hwdep *hw,
int lret, err;
char *buf;
- snd_printdd("dsp_load %s\n", dsp->name);
-
buf = memdup_user(dsp->image, dsp->length);
if (IS_ERR(buf))
return PTR_ERR(buf);
err = usb_set_interface(dev, 0, 1);
if (err)
- snd_printk(KERN_ERR "usb_set_interface error\n");
+ dev_err(&dev->dev, "usb_set_interface error\n");
else
err = usb_bulk_msg(dev, usb_sndbulkpipe(dev, 2), buf, dsp->length, &lret, 6000);
kfree(buf);
@@ -201,21 +193,20 @@ static int snd_usx2y_hwdep_dsp_load(struct snd_hwdep *hw,
msleep(250); // give the device some time
err = usx2y_async_seq04_init(priv);
if (err) {
- snd_printk(KERN_ERR "usx2y_async_seq04_init error\n");
+ dev_err(&dev->dev, "usx2y_async_seq04_init error\n");
return err;
}
err = usx2y_in04_init(priv);
if (err) {
- snd_printk(KERN_ERR "usx2y_in04_init error\n");
+ dev_err(&dev->dev, "usx2y_in04_init error\n");
return err;
}
err = usx2y_create_alsa_devices(hw->card);
if (err) {
- snd_printk(KERN_ERR "usx2y_create_alsa_devices error %i\n", err);
+ dev_err(&dev->dev, "usx2y_create_alsa_devices error %i\n", err);
return err;
}
priv->chip_status |= USX2Y_STAT_CHIP_INIT;
- snd_printdd("%s: alsa all started\n", hw->name);
}
return err;
}