aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarek Belisko <marek@goldelico.com>2015-02-28 21:54:42 +0100
committerJonathan Cameron <jic23@kernel.org>2015-03-14 18:36:15 +0000
commit8d09f48adfd282157f6afc94d2502b44156cb12f (patch)
treeb8c1b2ca32ee8321ef4c022c76850d36f09b8b44 /drivers
parentiio: bmc150: change sampling frequency (diff)
downloadlinux-dev-8d09f48adfd282157f6afc94d2502b44156cb12f.tar.xz
linux-dev-8d09f48adfd282157f6afc94d2502b44156cb12f.zip
staging: iio: hmc5843: Set iio name property in sysfs
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> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/iio/magnetometer/hmc5843_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/iio/magnetometer/hmc5843_core.c b/drivers/staging/iio/magnetometer/hmc5843_core.c
index fd171d8b38fb..90cc18b703cf 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;