Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208046
b: refs/heads/master
c: 8156d15
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent 482ec5e commit 20352ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: 787f4e5adaabba01becd646818dbace2d7e6b386
refs/heads/master: 8156d158efa6370a8183f47327f122edbb4f2cb6
8 changes: 4 additions & 4 deletions trunk/drivers/usb/gadget/storage_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,9 @@ static ssize_t fsg_store_ro(struct device *dev, struct device_attribute *attr,
ssize_t rc = count;
struct fsg_lun *curlun = fsg_lun_from_dev(dev);
struct rw_semaphore *filesem = dev_get_drvdata(dev);
int i;
unsigned long ro;

if (sscanf(buf, "%d", &i) != 1)
if (strict_strtoul(buf, 2, &ro))
return -EINVAL;

/*
Expand All @@ -762,8 +762,8 @@ static ssize_t fsg_store_ro(struct device *dev, struct device_attribute *attr,
LDBG(curlun, "read-only status change prevented\n");
rc = -EBUSY;
} else {
curlun->ro = !!i;
curlun->initially_ro = !!i;
curlun->ro = ro;
curlun->initially_ro = ro;
LDBG(curlun, "read-only status set to %d\n", curlun->ro);
}
up_read(filesem);
Expand Down

0 comments on commit 20352ec

Please sign in to comment.