X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fstorage%2Fonetouch.c;h=c7bf8954b4e4de35af0be81e9d7244ed9881eb16;hb=802f389a2cc6e2771b8de915ac241456d41eb79e;hp=d35369392feda4b8939e5a47f91da758b95f2743;hpb=a43266355b3d8cf6717a27159f9a417bdff73782;p=linux-2.6-omap-h63xx.git diff --git a/drivers/usb/storage/onetouch.c b/drivers/usb/storage/onetouch.c index d35369392fe..c7bf8954b4e 100644 --- a/drivers/usb/storage/onetouch.c +++ b/drivers/usb/storage/onetouch.c @@ -38,7 +38,7 @@ #include "onetouch.h" #include "debug.h" -void onetouch_release_input(void *onetouch_); +static void onetouch_release_input(void *onetouch_); struct usb_onetouch { char name[128]; @@ -57,9 +57,10 @@ static void usb_onetouch_irq(struct urb *urb) struct usb_onetouch *onetouch = urb->context; signed char *data = onetouch->data; struct input_dev *dev = onetouch->dev; - int status; + int status = urb->status; + int retval; - switch (urb->status) { + switch (status) { case 0: /* success */ break; case -ECONNRESET: /* unlink */ @@ -75,11 +76,11 @@ static void usb_onetouch_irq(struct urb *urb) input_sync(dev); resubmit: - status = usb_submit_urb (urb, GFP_ATOMIC); - if (status) - err ("can't resubmit intr, %s-%s/input0, status %d", - onetouch->udev->bus->bus_name, - onetouch->udev->devpath, status); + retval = usb_submit_urb (urb, GFP_ATOMIC); + if (retval) + dev_err(&dev->dev, "can't resubmit intr, %s-%s/input0, " + "retval %d\n", onetouch->udev->bus->bus_name, + onetouch->udev->devpath, retval); } static int usb_onetouch_open(struct input_dev *dev) @@ -89,7 +90,7 @@ static int usb_onetouch_open(struct input_dev *dev) onetouch->is_open = 1; onetouch->irq->dev = onetouch->udev; if (usb_submit_urb(onetouch->irq, GFP_KERNEL)) { - err("usb_submit_urb failed"); + dev_err(&dev->dev, "usb_submit_urb failed\n"); return -EIO; } @@ -116,7 +117,8 @@ static void usb_onetouch_pm_hook(struct us_data *us, int action) break; case US_RESUME: if (usb_submit_urb(onetouch->irq, GFP_KERNEL) != 0) - err("usb_submit_urb failed"); + dev_err(&onetouch->irq->dev->dev, + "usb_submit_urb failed\n"); break; default: break; @@ -222,7 +224,7 @@ int onetouch_connect_input(struct us_data *ss) return error; } -void onetouch_release_input(void *onetouch_) +static void onetouch_release_input(void *onetouch_) { struct usb_onetouch *onetouch = (struct usb_onetouch *) onetouch_;