]> asedeno.scripts.mit.edu Git - linux.git/commit
staging: iio: hmc5843: Set iio name dynamically
authorYong Li <sdliyong@gmail.com>
Wed, 12 Aug 2015 13:25:46 +0000 (21:25 +0800)
committerJonathan Cameron <jic23@kernel.org>
Sun, 16 Aug 2015 09:51:27 +0000 (10:51 +0100)
commit70b2737e0a948552843ce1b8500e033080677086
tree8d7409354be6b156dac212e1d07c0af6ce639812
parent3f9059b71791cf0e57a4879594f0066237976943
staging: iio: hmc5843: Set iio name dynamically

Load the driver using the below command:
echo hmc5983 0x1e > /sys/bus/i2c/devices/i2c-?/new_device

In sysfs, the iio name is hmc5843, however the i2c name is hmc5983,
they are inconsistent.

With this patch, the iio name will be the same as the i2c device name

Signed-off-by: Yong Li <sdliyong@gmail.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/magnetometer/hmc5843.h
drivers/staging/iio/magnetometer/hmc5843_core.c
drivers/staging/iio/magnetometer/hmc5843_i2c.c
drivers/staging/iio/magnetometer/hmc5843_spi.c