aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2013-10-15 02:33:12 -0400
committerFelipe Balbi <balbi@ti.com>2013-10-15 07:52:04 -0400
commit81a1d5ea6670acecf1366cd6a4d328c123bdf9fa (patch)
tree81e98edaa5d49160c19a68db41dd28a4159c7c6e /drivers/usb
parent7f4d1e7bdd9f293a522e5559f1b64a95c066c15e (diff)
usb: gadget: storage_common: use strtobool instead of kstrtouint
strtobool is more flexible for the user and is more appropriate in the context. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/storage_common.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index c7b78a1f6086..8bd5f2d838db 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -375,9 +375,9 @@ ssize_t fsg_store_ro(struct fsg_lun *curlun, struct rw_semaphore *filesem,
375 const char *buf, size_t count) 375 const char *buf, size_t count)
376{ 376{
377 ssize_t rc; 377 ssize_t rc;
378 unsigned ro; 378 bool ro;
379 379
380 rc = kstrtouint(buf, 2, &ro); 380 rc = strtobool(buf, &ro);
381 if (rc) 381 if (rc)
382 return rc; 382 return rc;
383 383
@@ -402,10 +402,10 @@ EXPORT_SYMBOL(fsg_store_ro);
402 402
403ssize_t fsg_store_nofua(struct fsg_lun *curlun, const char *buf, size_t count) 403ssize_t fsg_store_nofua(struct fsg_lun *curlun, const char *buf, size_t count)
404{ 404{
405 unsigned nofua; 405 bool nofua;
406 int ret; 406 int ret;
407 407
408 ret = kstrtouint(buf, 2, &nofua); 408 ret = strtobool(buf, &nofua);
409 if (ret) 409 if (ret)
410 return ret; 410 return ret;
411 411
@@ -452,10 +452,10 @@ EXPORT_SYMBOL(fsg_store_file);
452 452
453ssize_t fsg_store_cdrom(struct fsg_lun *curlun, const char *buf, size_t count) 453ssize_t fsg_store_cdrom(struct fsg_lun *curlun, const char *buf, size_t count)
454{ 454{
455 unsigned cdrom; 455 bool cdrom;
456 int ret; 456 int ret;
457 457
458 ret = kstrtouint(buf, 2, &cdrom); 458 ret = strtobool(buf, &cdrom);
459 if (ret) 459 if (ret)
460 return ret; 460 return ret;
461 461
@@ -468,10 +468,10 @@ EXPORT_SYMBOL(fsg_store_cdrom);
468ssize_t fsg_store_removable(struct fsg_lun *curlun, const char *buf, 468ssize_t fsg_store_removable(struct fsg_lun *curlun, const char *buf,
469 size_t count) 469 size_t count)
470{ 470{
471 unsigned removable; 471 bool removable;
472 int ret; 472 int ret;
473 473
474 ret = kstrtouint(buf, 2, &removable); 474 ret = strtobool(buf, &removable);
475 if (ret) 475 if (ret)
476 return ret; 476 return ret;
477 477