All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: tmp006: Set correct iio name
@ 2016-04-22  3:43 Yong Li
  2016-04-25 19:33 ` Jonathan Cameron
  0 siblings, 1 reply; 19+ messages in thread
From: Yong Li @ 2016-04-22  3:43 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw, k.kozlowski, mranostay, linux-iio,
	linux-kernel
  Cc: sdliyong

When load the driver using the below command:
echo tmp006 0x40 > /sys/bus/i2c/devices/i2c-0/new_device

In sysfs, the i2c name is tmp006, 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

Signed-off-by: Yong Li <sdliyong@gmail.com>
---
 drivers/iio/temperature/tmp006.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/temperature/tmp006.c b/drivers/iio/temperature/tmp006.c
index 18c9b43..17c8413 100644
--- a/drivers/iio/temperature/tmp006.c
+++ b/drivers/iio/temperature/tmp006.c
@@ -221,7 +221,7 @@ static int tmp006_probe(struct i2c_client *client,
 	data->client = 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 = &tmp006_info;
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-05-03 12:00 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-22  3:43 [PATCH] iio: tmp006: Set correct iio name Yong Li
2016-04-25 19:33 ` Jonathan Cameron
2016-04-25 20:59   ` Crestez Dan Leonard
2016-04-25 21:11     ` Jonathan Cameron
2016-04-26 10:57       ` Lars-Peter Clausen
2016-04-26 11:47         ` Yong Li
2016-04-26 12:01           ` Lars-Peter Clausen
2016-04-26 13:14             ` Yong Li
2016-04-26 15:21               ` Daniel Baluta
2016-04-27  3:42                 ` Yong Li
2016-04-27 16:58                 ` Crestez Dan Leonard
2016-04-28  8:25                   ` Lars-Peter Clausen
2016-04-28 13:24                     ` One Thousand Gnomes
2016-04-28 13:30                       ` Peter Meerwald-Stadler
2016-04-28 14:19                         ` Lars-Peter Clausen
2016-05-01 19:34                           ` Jonathan Cameron
2016-05-03  9:43                             ` [was iio: tmp006: Set correct iio name] how to support multiple instances of same device type Gregor Boirie
2016-05-03 12:00                               ` Crestez Dan Leonard
2016-04-28 14:17                       ` [PATCH] iio: tmp006: Set correct iio name Lars-Peter Clausen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.