summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/industrialio-core.c
diff options
context:
space:
mode:
authorJonathan Cameron2011-05-18 15:42:12 +0200
committerGreg Kroah-Hartman2011-05-20 01:15:00 +0200
commit41c775240a78fac3e2bd7f024c3cf0d61547249e (patch)
tree4526f1bca2227ae11df667976c87316b83680356 /drivers/staging/iio/industrialio-core.c
parentstaging:iio:trigger sysfs userspace trigger rework. (diff)
downloadkernel-qcow2-linux-41c775240a78fac3e2bd7f024c3cf0d61547249e.tar.gz
kernel-qcow2-linux-41c775240a78fac3e2bd7f024c3cf0d61547249e.tar.xz
kernel-qcow2-linux-41c775240a78fac3e2bd7f024c3cf0d61547249e.zip
staging:iio:core clean out unused elements.
Trivial cleanup of things that have fallen by the way. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/industrialio-core.c')
-rw-r--r--drivers/staging/iio/industrialio-core.c47
1 files changed, 2 insertions, 45 deletions
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
index fc20a06a2a1b..49560e4c95ae 100644
--- a/drivers/staging/iio/industrialio-core.c
+++ b/drivers/staging/iio/industrialio-core.c
@@ -998,21 +998,6 @@ static inline int __iio_add_event_config_attrs(struct iio_dev *dev_info, int i)
{
int j;
int ret;
- struct attribute **attrp, **attrq;
-
- if (dev_info->event_conf_attrs && dev_info->event_conf_attrs[i].attrs) {
- attrp = dev_info->event_conf_attrs[i].attrs;
- while (*attrp) {
- ret = sysfs_add_file_to_group(&dev_info
- ->event_interfaces[0]
- .dev.kobj,
- *attrp,
- NULL);
- if (ret)
- goto error_ret;
- attrp++;
- }
- }
INIT_LIST_HEAD(&dev_info->event_interfaces[0].dev_attr_list);
/* Dynically created from the channels array */
if (dev_info->channels) {
@@ -1027,19 +1012,7 @@ static inline int __iio_add_event_config_attrs(struct iio_dev *dev_info, int i)
return 0;
error_clear_attrs:
- __iio_remove_all_event_sysfs(dev_info,
- NULL,
- i);
-error_ret:
- attrq = dev_info->event_conf_attrs[i].attrs;
- while (attrq != attrp) {
- sysfs_remove_file_from_group(&dev_info
- ->event_interfaces[0]
- .dev.kobj,
- *attrq,
- NULL);
- attrq++;
- }
+ __iio_remove_all_event_sysfs(dev_info, NULL, i);
return ret;
}
@@ -1047,23 +1020,7 @@ error_ret:
static inline int __iio_remove_event_config_attrs(struct iio_dev *dev_info,
int i)
{
- struct attribute **attrq;
- __iio_remove_all_event_sysfs(dev_info,
- NULL,
- i);
- if (dev_info->event_conf_attrs
- && dev_info->event_conf_attrs[i].attrs) {
- attrq = dev_info->event_conf_attrs[i].attrs;
- while (*attrq) {
- sysfs_remove_file_from_group(&dev_info
- ->event_interfaces[0]
- .dev.kobj,
- *attrq,
- NULL);
- attrq++;
- }
- }
-
+ __iio_remove_all_event_sysfs(dev_info, NULL, i);
return 0;
}