linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] iio: Don't include extended name in shared attributes
@ 2014-02-14 14:19 Lars-Peter Clausen
  2014-02-14 14:19 ` [PATCH 2/2] iio: Avoid unnecessary kasprintf Lars-Peter Clausen
  2014-02-18 10:27 ` [PATCH 1/2] iio: Don't include extended name in shared attributes Jonathan Cameron
  0 siblings, 2 replies; 4+ messages in thread
From: Lars-Peter Clausen @ 2014-02-14 14:19 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Lars-Peter Clausen

The extended name is channel specific and should not be included in shared
attributes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
It's a fix, but there are no drivers yet, which have channels with extended
names and shared attributes, so no need to apply it to the fixes branch.
---
 drivers/iio/industrialio-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index acc911a..fd96e8b 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -558,7 +558,7 @@ int __iio_device_attr_init(struct device_attribute *dev_attr,
 								    ->channel2],
 						 postfix);
 	} else {
-		if (chan->extend_name == NULL)
+		if (chan->extend_name == NULL || shared_by != IIO_SEPARATE)
 			full_postfix = kstrdup(postfix, GFP_KERNEL);
 		else
 			full_postfix = kasprintf(GFP_KERNEL,
-- 
1.8.0

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

end of thread, other threads:[~2014-02-18 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-14 14:19 [PATCH 1/2] iio: Don't include extended name in shared attributes Lars-Peter Clausen
2014-02-14 14:19 ` [PATCH 2/2] iio: Avoid unnecessary kasprintf Lars-Peter Clausen
2014-02-18 10:31   ` Jonathan Cameron
2014-02-18 10:27 ` [PATCH 1/2] iio: Don't include extended name in shared attributes Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).