Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46662
b: refs/heads/master
c: 2505107
h: refs/heads/master
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Feb 7, 2007
1 parent fde5da2 commit 2c8e491
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 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: 6dde896e4eac122f388263f0097b691acdc0396f
refs/heads/master: 2505107def8b300576223367e3b603620d825e52
56 changes: 28 additions & 28 deletions trunk/drivers/usb/gadget/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/


// #define DEBUG /* data to help fault diagnosis */
// #define DEBUG /* data to help fault diagnosis */
// #define VERBOSE /* extra debug messages (success too) */

#include <linux/init.h>
Expand Down Expand Up @@ -565,29 +565,29 @@ static ssize_t ep_aio_read_retry(struct kiocb *iocb)
ssize_t len, total;
int i;

/* we "retry" to get the right mm context for this: */

/* copy stuff into user buffers */
total = priv->actual;
len = 0;
for (i=0; i < priv->nr_segs; i++) {
ssize_t this = min((ssize_t)(priv->iv[i].iov_len), total);

if (copy_to_user(priv->iv[i].iov_base, priv->buf, this)) {
if (len == 0)
len = -EFAULT;
break;
}

total -= this;
len += this;
if (total == 0)
break;
}
kfree(priv->buf);
kfree(priv);
aio_put_req(iocb);
return len;
/* we "retry" to get the right mm context for this: */

/* copy stuff into user buffers */
total = priv->actual;
len = 0;
for (i=0; i < priv->nr_segs; i++) {
ssize_t this = min((ssize_t)(priv->iv[i].iov_len), total);

if (copy_to_user(priv->iv[i].iov_base, priv->buf, this)) {
if (len == 0)
len = -EFAULT;
break;
}

total -= this;
len += this;
if (total == 0)
break;
}
kfree(priv->buf);
kfree(priv);
aio_put_req(iocb);
return len;
}

static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req)
Expand Down Expand Up @@ -636,7 +636,7 @@ ep_aio_rwtail(
size_t len,
struct ep_data *epdata,
const struct iovec *iv,
unsigned long nr_segs
unsigned long nr_segs
)
{
struct kiocb_priv *priv;
Expand Down Expand Up @@ -1808,7 +1808,7 @@ static struct usb_gadget_driver gadgetfs_driver = {
.disconnect = gadgetfs_disconnect,
.suspend = gadgetfs_suspend,

.driver = {
.driver = {
.name = (char *) shortname,
},
};
Expand All @@ -1829,7 +1829,7 @@ static struct usb_gadget_driver probe_driver = {
.unbind = gadgetfs_nop,
.setup = (void *)gadgetfs_nop,
.disconnect = gadgetfs_nop,
.driver = {
.driver = {
.name = "nop",
},
};
Expand All @@ -1849,7 +1849,7 @@ static struct usb_gadget_driver probe_driver = {
* . full/low speed config ... all wTotalLength bytes (with interface,
* class, altsetting, endpoint, and other descriptors)
* . high speed config ... all descriptors, for high speed operation;
* this one's optional except for high-speed hardware
* this one's optional except for high-speed hardware
* . device descriptor
*
* Endpoints are not yet enabled. Drivers may want to immediately
Expand Down

0 comments on commit 2c8e491

Please sign in to comment.