From: Jonathan Cameron Date: Wed, 26 Oct 2011 16:27:42 +0000 (+0100) Subject: staging:iio:core shared attrs do not work with modifier. X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=0403e0d643809f1608448ada38a1877f26b7bf5d;p=deliverable%2Flinux.git staging:iio:core shared attrs do not work with modifier. The logic building the name had a small bug where it did not verify if it was generic before applying the modifier. Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c index 26564094e33b..fbf24bdc56d9 100644 --- a/drivers/staging/iio/industrialio-core.c +++ b/drivers/staging/iio/industrialio-core.c @@ -416,7 +416,7 @@ int __iio_device_attr_init(struct device_attribute *dev_attr, sysfs_attr_init(&dev_attr->attr); /* Build up postfix of __postfix */ - if (chan->modified) { + if (chan->modified && !generic) { if (chan->extend_name) full_postfix = kasprintf(GFP_KERNEL, "%s_%s_%s", iio_modifier_names[chan