summaryrefslogtreecommitdiffstats
path: root/sound/usb/caiaq/input.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/input.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/input.c')
-rw-r--r--sound/usb/caiaq/input.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/usb/caiaq/input.c b/sound/usb/caiaq/input.c
index a32ad7cd76f..fe8f4b4fd36 100644
--- a/sound/usb/caiaq/input.c
+++ b/sound/usb/caiaq/input.c
@@ -16,6 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <linux/device.h>
#include <linux/gfp.h>
#include <linux/init.h>
#include <linux/usb.h>
@@ -340,6 +341,8 @@ static void snd_usb_caiaq_tks4_dispatch(struct snd_usb_caiaqdev *cdev,
const unsigned char *buf,
unsigned int len)
{
+ struct device *dev = caiaqdev_to_dev(cdev);
+
while (len) {
unsigned int i, block_id = (buf[0] << 8) | buf[1];
@@ -466,7 +469,7 @@ static void snd_usb_caiaq_tks4_dispatch(struct snd_usb_caiaqdev *cdev,
break;
default:
- debug("%s(): bogus block (id %d)\n",
+ dev_dbg(dev, "%s(): bogus block (id %d)\n",
__func__, block_id);
return;
}
@@ -500,6 +503,7 @@ static void snd_usb_caiaq_maschine_dispatch(struct snd_usb_caiaqdev *cdev,
static void snd_usb_caiaq_ep4_reply_dispatch(struct urb *urb)
{
struct snd_usb_caiaqdev *cdev = urb->context;
+ struct device *dev = caiaqdev_to_dev(cdev);
unsigned char *buf = urb->transfer_buffer;
int ret;
@@ -535,7 +539,7 @@ requeue:
cdev->ep4_in_urb->actual_length = 0;
ret = usb_submit_urb(cdev->ep4_in_urb, GFP_ATOMIC);
if (ret < 0)
- log("unable to submit urb. OOM!?\n");
+ dev_err(dev, "unable to submit urb. OOM!?\n");
}
static int snd_usb_caiaq_input_open(struct input_dev *idev)