summaryrefslogtreecommitdiffstats
path: root/drivers/iio/industrialio-core.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-10-22 12:15:00 +0100
committerJonathan Cameron <jic23@kernel.org>2012-11-02 09:43:48 +0000
commitef4f92c064697a66a2a61977dd690af40dc01ff0 (patch)
tree9ecc8cb76f8d1dbcb8c35afd6b92d5c3ccfa2559 /drivers/iio/industrialio-core.c
parent02330acda7ef88865e62e2763df2cdd735607cb4 (diff)
downloadlinux-ef4f92c064697a66a2a61977dd690af40dc01ff0.tar.bz2
iio: Accept a leading '+' sign when parsing fixed point numbers
If we encounter a leading '+' sign just skip over it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/industrialio-core.c')
-rw-r--r--drivers/iio/industrialio-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 7bb570b7a4af..cd700368eed0 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -437,6 +437,8 @@ static ssize_t iio_write_channel_info(struct device *dev,
if (buf[0] == '-') {
negative = true;
buf++;
+ } else if (buf[0] == '+') {
+ buf++;
}
while (*buf) {