Skip to content

Commit

Permalink
staging: iio: hmc5843: Set iio name property in sysfs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marek Belisko authored and Jonathan Cameron committed Mar 14, 2015
1 parent 0ba8da9 commit 8d09f48
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/iio/magnetometer/hmc5843_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8d09f48

Please sign in to comment.