Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303621
b: refs/heads/master
c: 3bd9597
h: refs/heads/master
i:
  303619: 07c721b
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Apr 25, 2012
1 parent 39e3fe5 commit 2659fe8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f80bb943d755d48b894c677097fd80c7d7cce16
refs/heads/master: 3bd9597a6b8d5111c698a38761c4e2883cdcf8c9
21 changes: 11 additions & 10 deletions trunk/drivers/input/tablet/gtco.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
GTCO digitizer USB driver
Use the err() and dbg() macros from usb.h for system logging
TO CHECK: Is pressure done right on report 5?
Copyright (C) 2006 GTCO CalComp
Expand Down Expand Up @@ -808,7 +806,8 @@ static void gtco_urb_callback(struct urb *urbinfo)
resubmit:
rc = usb_submit_urb(urbinfo, GFP_ATOMIC);
if (rc != 0)
err("usb_submit_urb failed rc=0x%x", rc);
dev_err(&device->usbdev->dev,
"usb_submit_urb failed rc=0x%x\n", rc);
}

/*
Expand Down Expand Up @@ -838,7 +837,7 @@ static int gtco_probe(struct usb_interface *usbinterface,
gtco = kzalloc(sizeof(struct gtco), GFP_KERNEL);
input_dev = input_allocate_device();
if (!gtco || !input_dev) {
err("No more memory");
dev_err(&usbinterface->dev, "No more memory\n");
error = -ENOMEM;
goto err_free_devs;
}
Expand All @@ -853,15 +852,15 @@ static int gtco_probe(struct usb_interface *usbinterface,
gtco->buffer = usb_alloc_coherent(gtco->usbdev, REPORT_MAX_SIZE,
GFP_KERNEL, &gtco->buf_dma);
if (!gtco->buffer) {
err("No more memory for us buffers");
dev_err(&usbinterface->dev, "No more memory for us buffers\n");
error = -ENOMEM;
goto err_free_devs;
}

/* Allocate URB for reports */
gtco->urbinfo = usb_alloc_urb(0, GFP_KERNEL);
if (!gtco->urbinfo) {
err("Failed to allocate URB");
dev_err(&usbinterface->dev, "Failed to allocate URB\n");
error = -ENOMEM;
goto err_free_buf;
}
Expand All @@ -888,7 +887,8 @@ static int gtco_probe(struct usb_interface *usbinterface,
*/
if (usb_get_extra_descriptor(usbinterface->cur_altsetting,
HID_DEVICE_TYPE, &hid_desc) != 0){
err("Can't retrieve exta USB descriptor to get hid report descriptor length");
dev_err(&usbinterface->dev,
"Can't retrieve exta USB descriptor to get hid report descriptor length\n");
error = -EIO;
goto err_free_urb;
}
Expand All @@ -898,7 +898,7 @@ static int gtco_probe(struct usb_interface *usbinterface,

report = kzalloc(le16_to_cpu(hid_desc->wDescriptorLength), GFP_KERNEL);
if (!report) {
err("No more memory for report");
dev_err(&usbinterface->dev, "No more memory for report\n");
error = -ENOMEM;
goto err_free_urb;
}
Expand Down Expand Up @@ -926,8 +926,9 @@ static int gtco_probe(struct usb_interface *usbinterface,

/* If we didn't get the report, fail */
if (result != le16_to_cpu(hid_desc->wDescriptorLength)) {
err("Failed to get HID Report Descriptor of size: %d",
hid_desc->wDescriptorLength);
dev_err(&usbinterface->dev,
"Failed to get HID Report Descriptor of size: %d\n",
hid_desc->wDescriptorLength);
error = -EIO;
goto err_free_urb;
}
Expand Down

0 comments on commit 2659fe8

Please sign in to comment.