Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248731
b: refs/heads/master
c: db8fa28
h: refs/heads/master
i:
  248729: 8ca69a2
  248727: 21e2892
v: v3
  • Loading branch information
Michal Nazarewicz authored and Greg Kroah-Hartman committed Apr 14, 2011
1 parent 523e741 commit 13f1517
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 90e6ca5cda8a38b7bb53660e67eff0845c0abe3f
refs/heads/master: db8fa2852ed5b46c05148db87be135300f17b8ce
15 changes: 9 additions & 6 deletions trunk/drivers/usb/gadget/storage_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,10 +704,11 @@ 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);
unsigned long ro;
unsigned ro;

if (strict_strtoul(buf, 2, &ro))
return -EINVAL;
rc = kstrtouint(buf, 2, &ro);
if (rc)
return rc;

/*
* Allow the write-enable status to change only while the
Expand All @@ -731,10 +732,12 @@ static ssize_t fsg_store_nofua(struct device *dev,
const char *buf, size_t count)
{
struct fsg_lun *curlun = fsg_lun_from_dev(dev);
unsigned long nofua;
unsigned nofua;
int ret;

if (strict_strtoul(buf, 2, &nofua))
return -EINVAL;
ret = kstrtouint(buf, 2, &nofua);
if (ret)
return ret;

/* Sync data when switching from async mode to sync */
if (!nofua && curlun->nofua)
Expand Down

0 comments on commit 13f1517

Please sign in to comment.