Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: hmc5843 : trivial changes to the way scale is reported
@ 2010-09-03 10:07 Shubhrajyoti D
  2010-09-04 16:01 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Shubhrajyoti D @ 2010-09-03 10:07 UTC (permalink / raw)
  To: linux-iio; +Cc: Shubhrajyoti D


Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-06  6:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-03 10:07 [PATCH] iio: hmc5843 : trivial changes to the way scale is reported Shubhrajyoti D
2010-09-04 16:01 ` Jonathan Cameron
2010-09-06  6:49   ` Datta, Shubhrajyoti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox