提交 871ba51c 编写于 作者: G Greg Kroah-Hartman

USB: input: aiptek.c: fix up dev_* messages

Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Jesper Juhl <jj@chaosbits.net>
CC: JJ Ding <dgdunix@gmail.com>
CC: Edwin van Vliet <edwin@cheatah.nl>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 334698d4
......@@ -309,6 +309,7 @@ struct aiptek_settings {
struct aiptek {
struct input_dev *inputdev; /* input device struct */
struct usb_device *usbdev; /* usb device struct */
struct usb_interface *intf; /* usb interface struct */
struct urb *urb; /* urb for incoming reports */
dma_addr_t data_dma; /* our dma stuffage */
struct aiptek_features features; /* tablet's array of features */
......@@ -435,6 +436,7 @@ static void aiptek_irq(struct urb *urb)
struct aiptek *aiptek = urb->context;
unsigned char *data = aiptek->data;
struct input_dev *inputdev = aiptek->inputdev;
struct usb_interface *intf = aiptek->intf;
int jitterable = 0;
int retval, macro, x, y, z, left, right, middle, p, dv, tip, bs, pck;
......@@ -447,14 +449,12 @@ static void aiptek_irq(struct urb *urb)
case -ENOENT:
case -ESHUTDOWN:
/* This urb is terminated, clean up */
dev_dbg(&inputdev->dev,
"%s - urb shutting down with status: %d\n",
dev_dbg(&intf->dev, "%s - urb shutting down with status: %d\n",
__func__, urb->status);
return;
default:
dev_dbg(&inputdev->dev,
"%s - nonzero urb status received: %d\n",
dev_dbg(&intf->dev, "%s - nonzero urb status received: %d\n",
__func__, urb->status);
goto exit;
}
......@@ -787,7 +787,7 @@ static void aiptek_irq(struct urb *urb)
1 | AIPTEK_REPORT_TOOL_UNKNOWN);
input_sync(inputdev);
} else {
dev_dbg(&inputdev->dev, "Unknown report %d\n", data[0]);
dev_dbg(&intf->dev, "Unknown report %d\n", data[0]);
}
/* Jitter may occur when the user presses a button on the stlyus
......@@ -813,7 +813,7 @@ static void aiptek_irq(struct urb *urb)
exit:
retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval != 0) {
dev_err(&inputdev->dev,
dev_err(&intf->dev,
"%s - usb_submit_urb failed with result %d\n",
__func__, retval);
}
......@@ -915,7 +915,7 @@ aiptek_command(struct aiptek *aiptek, unsigned char command, unsigned char data)
if ((ret =
aiptek_set_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) {
dev_dbg(&aiptek->inputdev->dev,
dev_dbg(&aiptek->intf->dev,
"aiptek_program: failed, tried to send: 0x%02x 0x%02x\n",
command, data);
}
......@@ -951,7 +951,7 @@ aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data)
if ((ret =
aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) {
dev_dbg(&aiptek->inputdev->dev,
dev_dbg(&aiptek->intf->dev,
"aiptek_query failed: returned 0x%02x 0x%02x 0x%02x\n",
buf[0], buf[1], buf[2]);
ret = -EIO;
......@@ -1731,6 +1731,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
aiptek->inputdev = inputdev;
aiptek->usbdev = usbdev;
aiptek->intf = intf;
aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber;
aiptek->inDelay = 0;
aiptek->endDelay = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册