summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElise Lennion <elise.lennion@gmail.com>2016-10-14 19:00:11 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-24 15:35:03 +0200
commitf9a21a3f4919539e6ee02625c22f67c3ef6041ec (patch)
treed97a8d8d8e879a4357ba74faa4631146e8ebc849
parent5bc45c9d1ebaa1734c36f2abf1db85b579888224 (diff)
staging: greybus: audio_manager_sysfs: Replace sscanf with kstrto* to single variable conversion.
Fix checkpatch warning: WARNING: Prefer kstrto<type> to single variable sscanf kstrto* is designed to convert string to numerical value and makes it easier to understand what the code does. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Reviewed-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/greybus/audio_manager_sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/greybus/audio_manager_sysfs.c b/drivers/staging/greybus/audio_manager_sysfs.c
index fc0aca6fe912..c6d82f9d656b 100644
--- a/drivers/staging/greybus/audio_manager_sysfs.c
+++ b/drivers/staging/greybus/audio_manager_sysfs.c
@@ -44,7 +44,7 @@ static ssize_t manager_sysfs_remove_store(
{
int id;
- int num = sscanf(buf, "%d", &id);
+ int num = kstrtoint(buf, 10, &id);
if (num != 1)
return -EINVAL;
@@ -65,7 +65,7 @@ static ssize_t manager_sysfs_dump_store(
{
int id;
- int num = sscanf(buf, "%d", &id);
+ int num = kstrtoint(buf, 10, &id);
if (num == 1) {
num = gb_audio_manager_dump_module(id);