[linux-yocto] [PATCHv2 2/2] iio: si7020: Set correct iio name
Yong Li
yong.b.li at intel.com
Mon May 30 22:53:00 PDT 2016
When load the driver using the below command:
echo si7020 0x40 > /sys/bus/i2c/devices/i2c-0/new_device
In sysfs, the i2c name is si7020, however the iio name is 0-0040,
they are inconsistent. With this patch,
the iio name will be the same as the i2c device name
Upstream-status: Pending
Signed-off-by: Yong Li <yong.b.li at intel.com>
---
drivers/iio/humidity/si7020.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/humidity/si7020.c b/drivers/iio/humidity/si7020.c
index 71991b5..61ed080 100644
--- a/drivers/iio/humidity/si7020.c
+++ b/drivers/iio/humidity/si7020.c
@@ -138,7 +138,7 @@ static int si7020_probe(struct i2c_client *client,
*data = client;
indio_dev->dev.parent = &client->dev;
- indio_dev->name = dev_name(&client->dev);
+ indio_dev->name = id->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &si7020_info;
indio_dev->channels = si7020_channels;
--
2.7.4
More information about the linux-yocto
mailing list