Skip to content

Commit 8d09f48

Browse files
Marek Beliskojic23
authored andcommitted
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>
1 parent 0ba8da9 commit 8d09f48

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/staging/iio/magnetometer/hmc5843_core.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ int hmc5843_common_probe(struct device *dev, struct regmap *regmap,
592592
mutex_init(&data->lock);
593593

594594
indio_dev->dev.parent = dev;
595+
indio_dev->name = dev->driver->name;
595596
indio_dev->info = &hmc5843_info;
596597
indio_dev->modes = INDIO_DIRECT_MODE;
597598
indio_dev->channels = data->variant->channels;

0 commit comments

Comments
 (0)