Skip to content

Commit

Permalink
USB: appletouch.c: remove dbg() usage
Browse files Browse the repository at this point in the history
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Alessandro Rubini <rubini@ipvvis.unipv.it>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Greg Kroah-Hartman committed May 2, 2012
1 parent 938476f commit 67946d1
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions drivers/input/mouse/appletouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,29 +401,32 @@ static inline void atp_report_fingers(struct input_dev *input, int fingers)
static int atp_status_check(struct urb *urb)
{
struct atp *dev = urb->context;
struct input_dev *idev = dev->input;

switch (urb->status) {
case 0:
/* success */
break;
case -EOVERFLOW:
if (!dev->overflow_warned) {
printk(KERN_WARNING "appletouch: OVERFLOW with data "
"length %d, actual length is %d\n",
dev_warn(&idev->dev,
"appletouch: OVERFLOW with data length %d, actual length is %d\n",
dev->info->datalen, dev->urb->actual_length);
dev->overflow_warned = true;
}
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
/* This urb is terminated, clean up */
dbg("atp_complete: urb shutting down with status: %d",
urb->status);
dev_dbg(&idev->dev,
"atp_complete: urb shutting down with status: %d\n",
urb->status);
return ATP_URB_STATUS_ERROR_FATAL;

default:
dbg("atp_complete: nonzero urb status received: %d",
urb->status);
dev_dbg(&idev->dev,
"atp_complete: nonzero urb status received: %d\n",
urb->status);
return ATP_URB_STATUS_ERROR;
}

Expand All @@ -446,7 +449,8 @@ static void atp_detect_size(struct atp *dev)
for (i = dev->info->xsensors; i < ATP_XSENSORS; i++) {
if (dev->xy_cur[i]) {

printk(KERN_INFO "appletouch: 17\" model detected.\n");
dev_info(&dev->input->dev,
"appletouch: 17\" model detected.\n");

input_set_abs_params(dev->input, ABS_X, 0,
(dev->info->xsensors_17 - 1) *
Expand Down

0 comments on commit 67946d1

Please sign in to comment.