aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/inode.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-01-15 14:30:28 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 18:44:35 -0500
commit2505107def8b300576223367e3b603620d825e52 (patch)
tree04e8b2dde93719524bda8b3f015e735e3f99ca08 /drivers/usb/gadget/inode.c
parent6dde896e4eac122f388263f0097b691acdc0396f (diff)
usb: gadgetfs whitespace cleanup
Remove some whitespace bugs in gadgetfs (mostly from someone's patch updating the AIO support). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/inode.c')
-rw-r--r--drivers/usb/gadget/inode.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index 3fb1044a4db0..10a5f7a164de 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -20,7 +20,7 @@
20 */ 20 */
21 21
22 22
23// #define DEBUG /* data to help fault diagnosis */ 23// #define DEBUG /* data to help fault diagnosis */
24// #define VERBOSE /* extra debug messages (success too) */ 24// #define VERBOSE /* extra debug messages (success too) */
25 25
26#include <linux/init.h> 26#include <linux/init.h>
@@ -565,29 +565,29 @@ static ssize_t ep_aio_read_retry(struct kiocb *iocb)
565 ssize_t len, total; 565 ssize_t len, total;
566 int i; 566 int i;
567 567
568 /* we "retry" to get the right mm context for this: */ 568 /* we "retry" to get the right mm context for this: */
569 569
570 /* copy stuff into user buffers */ 570 /* copy stuff into user buffers */
571 total = priv->actual; 571 total = priv->actual;
572 len = 0; 572 len = 0;
573 for (i=0; i < priv->nr_segs; i++) { 573 for (i=0; i < priv->nr_segs; i++) {
574 ssize_t this = min((ssize_t)(priv->iv[i].iov_len), total); 574 ssize_t this = min((ssize_t)(priv->iv[i].iov_len), total);
575 575
576 if (copy_to_user(priv->iv[i].iov_base, priv->buf, this)) { 576 if (copy_to_user(priv->iv[i].iov_base, priv->buf, this)) {
577 if (len == 0) 577 if (len == 0)
578 len = -EFAULT; 578 len = -EFAULT;
579 break; 579 break;
580 } 580 }
581 581
582 total -= this; 582 total -= this;
583 len += this; 583 len += this;
584 if (total == 0) 584 if (total == 0)
585 break; 585 break;
586 } 586 }
587 kfree(priv->buf); 587 kfree(priv->buf);
588 kfree(priv); 588 kfree(priv);
589 aio_put_req(iocb); 589 aio_put_req(iocb);
590 return len; 590 return len;
591} 591}
592 592
593static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req) 593static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req)
@@ -636,7 +636,7 @@ ep_aio_rwtail(
636 size_t len, 636 size_t len,
637 struct ep_data *epdata, 637 struct ep_data *epdata,
638 const struct iovec *iv, 638 const struct iovec *iv,
639 unsigned long nr_segs 639 unsigned long nr_segs
640) 640)
641{ 641{
642 struct kiocb_priv *priv; 642 struct kiocb_priv *priv;
@@ -1808,7 +1808,7 @@ static struct usb_gadget_driver gadgetfs_driver = {
1808 .disconnect = gadgetfs_disconnect, 1808 .disconnect = gadgetfs_disconnect,
1809 .suspend = gadgetfs_suspend, 1809 .suspend = gadgetfs_suspend,
1810 1810
1811 .driver = { 1811 .driver = {
1812 .name = (char *) shortname, 1812 .name = (char *) shortname,
1813 }, 1813 },
1814}; 1814};
@@ -1829,7 +1829,7 @@ static struct usb_gadget_driver probe_driver = {
1829 .unbind = gadgetfs_nop, 1829 .unbind = gadgetfs_nop,
1830 .setup = (void *)gadgetfs_nop, 1830 .setup = (void *)gadgetfs_nop,
1831 .disconnect = gadgetfs_nop, 1831 .disconnect = gadgetfs_nop,
1832 .driver = { 1832 .driver = {
1833 .name = "nop", 1833 .name = "nop",
1834 }, 1834 },
1835}; 1835};
@@ -1849,7 +1849,7 @@ static struct usb_gadget_driver probe_driver = {
1849 * . full/low speed config ... all wTotalLength bytes (with interface, 1849 * . full/low speed config ... all wTotalLength bytes (with interface,
1850 * class, altsetting, endpoint, and other descriptors) 1850 * class, altsetting, endpoint, and other descriptors)
1851 * . high speed config ... all descriptors, for high speed operation; 1851 * . high speed config ... all descriptors, for high speed operation;
1852 * this one's optional except for high-speed hardware 1852 * this one's optional except for high-speed hardware
1853 * . device descriptor 1853 * . device descriptor
1854 * 1854 *
1855 * Endpoints are not yet enabled. Drivers may want to immediately 1855 * Endpoints are not yet enabled. Drivers may want to immediately