diff options
author | Michal Nazarewicz <mina86@mina86.com> | 2011-04-13 18:37:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-13 20:02:11 -0400 |
commit | db8fa2852ed5b46c05148db87be135300f17b8ce (patch) | |
tree | 8e207a571aeac0af1c2917af52785a2cca09e5bf /drivers | |
parent | 90e6ca5cda8a38b7bb53660e67eff0845c0abe3f (diff) |
usb: gadget: storage_common: use kstrto*()
This commit replaces the usage of strict_strtoul() (which
became deprecated after commit 33ee3b2e) with kstrtouint().
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/storage_common.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c index 3179b8bb6ce..86fcebd89ab 100644 --- a/drivers/usb/gadget/storage_common.c +++ b/drivers/usb/gadget/storage_common.c | |||
@@ -704,10 +704,11 @@ static ssize_t fsg_store_ro(struct device *dev, struct device_attribute *attr, | |||
704 | ssize_t rc = count; | 704 | ssize_t rc = count; |
705 | struct fsg_lun *curlun = fsg_lun_from_dev(dev); | 705 | struct fsg_lun *curlun = fsg_lun_from_dev(dev); |
706 | struct rw_semaphore *filesem = dev_get_drvdata(dev); | 706 | struct rw_semaphore *filesem = dev_get_drvdata(dev); |
707 | unsigned long ro; | 707 | unsigned ro; |
708 | 708 | ||
709 | if (strict_strtoul(buf, 2, &ro)) | 709 | rc = kstrtouint(buf, 2, &ro); |
710 | return -EINVAL; | 710 | if (rc) |
711 | return rc; | ||
711 | 712 | ||
712 | /* | 713 | /* |
713 | * Allow the write-enable status to change only while the | 714 | * Allow the write-enable status to change only while the |
@@ -731,10 +732,12 @@ static ssize_t fsg_store_nofua(struct device *dev, | |||
731 | const char *buf, size_t count) | 732 | const char *buf, size_t count) |
732 | { | 733 | { |
733 | struct fsg_lun *curlun = fsg_lun_from_dev(dev); | 734 | struct fsg_lun *curlun = fsg_lun_from_dev(dev); |
734 | unsigned long nofua; | 735 | unsigned nofua; |
736 | int ret; | ||
735 | 737 | ||
736 | if (strict_strtoul(buf, 2, &nofua)) | 738 | ret = kstrtouint(buf, 2, &nofua); |
737 | return -EINVAL; | 739 | if (ret) |
740 | return ret; | ||
738 | 741 | ||
739 | /* Sync data when switching from async mode to sync */ | 742 | /* Sync data when switching from async mode to sync */ |
740 | if (!nofua && curlun->nofua) | 743 | if (!nofua && curlun->nofua) |