1
0
Fork 0

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Marek Belisko 2015-02-28 21:54:42 +01:00 committed by Greg Kroah-Hartman
parent 4c1d2dcb64
commit dae7f15e53
1 changed files with 1 additions and 0 deletions

View File

@ -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;