Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127221
b: refs/heads/master
c: 857cc4d
h: refs/heads/master
i:
  127219: 38fba2b
v: v3
  • Loading branch information
Ilpo Järvinen authored and Greg Kroah-Hartman committed Jan 7, 2009
1 parent da3105d commit fc8cd5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 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: b404299f6bfdf5aa7315e521b570e33f082b2f9e
refs/heads/master: 857cc4dfb6420ec0a67b3cda559aaa7c429ddce7
9 changes: 3 additions & 6 deletions trunk/drivers/usb/class/usbtmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/uaccess.h>
#include <linux/kref.h>
Expand Down Expand Up @@ -482,7 +483,6 @@ static ssize_t usbtmc_write(struct file *filp, const char __user *buf,
int retval;
int actual;
unsigned long int n_bytes;
int n;
int remaining;
int done;
int this_part;
Expand Down Expand Up @@ -526,11 +526,8 @@ static ssize_t usbtmc_write(struct file *filp, const char __user *buf,
goto exit;
}

n_bytes = 12 + this_part;
if (this_part % 4)
n_bytes += 4 - this_part % 4;
for (n = 12 + this_part; n < n_bytes; n++)
buffer[n] = 0;
n_bytes = roundup(12 + this_part, 4);
memset(buffer + 12 + this_part, 0, n_bytes - (12 + this_part));

retval = usb_bulk_msg(data->usb_dev,
usb_sndbulkpipe(data->usb_dev,
Expand Down

0 comments on commit fc8cd5e

Please sign in to comment.