[PATCH] iio: hmc5843 : trivial changes to the way scale is reported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Shubhrajyoti D <shubhrajyoti@xxxxxx>
---
 drivers/staging/iio/magnetometer/hmc5843.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 66aab5a..b35b443 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -465,7 +465,7 @@ static ssize_t show_scale(struct device *dev,
 {
 	struct iio_dev *indio_dev = dev_get_drvdata(dev);
 	struct hmc5843_data *data = indio_dev->dev_data;
-	return strlen(strcpy(buf, regval_to_scale[data->range]));
+	return sprintf(buf, "%s\n", regval_to_scale[data->range]);
 }
 static IIO_DEVICE_ATTR(magn_scale,
 			S_IRUGO,
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux