lkml.org 
[lkml]   [2015]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] staging: iio: hmc5843: Set iio name property in sysfs
Date
Without this change file name for hmc5843 is empty in
/sys/bus/iio/devices/iio\:device*/name

With this change name is reported correctly:
cat /sys/bus/iio/devices/iio\:device*/name
hmc5843

Signed-off-by: Marek Belisko <marek@goldelico.com>
---
drivers/staging/iio/magnetometer/hmc5843_core.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/staging/iio/magnetometer/hmc5843_core.c b/drivers/staging/iio/magnetometer/hmc5843_core.c
index fd171d8..90cc18b 100644
--- a/drivers/staging/iio/magnetometer/hmc5843_core.c
+++ b/drivers/staging/iio/magnetometer/hmc5843_core.c
@@ -592,6 +592,7 @@ int hmc5843_common_probe(struct device *dev, struct regmap *regmap,
mutex_init(&data->lock);

indio_dev->dev.parent = dev;
+ indio_dev->name = dev->driver->name;
indio_dev->info = &hmc5843_info;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = data->variant->channels;
--
1.9.1


\
 
 \ /
  Last update: 2015-02-28 22:01    [W:0.341 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site