aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2011-05-18 09:42:12 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-19 19:15:00 -0400
commit41c775240a78fac3e2bd7f024c3cf0d61547249e (patch)
tree4526f1bca2227ae11df667976c87316b83680356
parent1f785681a87068f123d3e23da13b2c55ab4f93ac (diff)
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>
-rw-r--r--drivers/staging/iio/iio.h13
-rw-r--r--drivers/staging/iio/industrialio-core.c47
2 files changed, 2 insertions, 58 deletions
diff --git a/drivers/staging/iio/iio.h b/drivers/staging/iio/iio.h
index c6fda58b4bd1..1ad9480fc694 100644
--- a/drivers/staging/iio/iio.h
+++ b/drivers/staging/iio/iio.h
@@ -25,8 +25,6 @@
25/* Event interface flags */ 25/* Event interface flags */
26#define IIO_BUSY_BIT_POS 1 26#define IIO_BUSY_BIT_POS 1
27 27
28struct iio_dev;
29
30/* naughty temporary hack to match these against the event version 28/* naughty temporary hack to match these against the event version
31 - need to flattern these together */ 29 - need to flattern these together */
32enum iio_chan_type { 30enum iio_chan_type {
@@ -221,7 +219,6 @@ static inline s64 iio_get_time_ns(void)
221 * ownership of chrdevs etc 219 * ownership of chrdevs etc
222 * @num_interrupt_lines:[DRIVER] number of physical interrupt lines from device 220 * @num_interrupt_lines:[DRIVER] number of physical interrupt lines from device
223 * @event_attrs: [DRIVER] event control attributes 221 * @event_attrs: [DRIVER] event control attributes
224 * @event_conf_attrs: [DRIVER] event configuration attributes
225 * @event_interfaces: [INTERN] event chrdevs associated with interrupt lines 222 * @event_interfaces: [INTERN] event chrdevs associated with interrupt lines
226 * @ring: [DRIVER] any ring buffer present 223 * @ring: [DRIVER] any ring buffer present
227 * @mlock: [INTERN] lock used to prevent simultaneous device state 224 * @mlock: [INTERN] lock used to prevent simultaneous device state
@@ -259,8 +256,6 @@ struct iio_dev {
259 256
260 int num_interrupt_lines; 257 int num_interrupt_lines;
261 struct attribute_group *event_attrs; 258 struct attribute_group *event_attrs;
262 struct attribute_group *event_conf_attrs;
263
264 struct iio_event_interface *event_interfaces; 259 struct iio_event_interface *event_interfaces;
265 260
266 struct iio_ring_buffer *ring; 261 struct iio_ring_buffer *ring;
@@ -326,14 +321,6 @@ int iio_push_event(struct iio_dev *dev_info,
326 int ev_code, 321 int ev_code,
327 s64 timestamp); 322 s64 timestamp);
328 323
329/**
330 * iio_allocate_chrdev() - Allocate a chrdev
331 * @handler: struct that contains relevant file handling for chrdev
332 * @dev_info: iio_dev for which chrdev is being created
333 **/
334int iio_allocate_chrdev(struct iio_handler *handler, struct iio_dev *dev_info);
335void iio_deallocate_chrdev(struct iio_handler *handler);
336
337/* Used to distinguish between bipolar and unipolar scan elemenents. 324/* Used to distinguish between bipolar and unipolar scan elemenents.
338 * Whilst this may seem obvious, we may well want to change the representation 325 * Whilst this may seem obvious, we may well want to change the representation
339 * in the future!*/ 326 * in the future!*/
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)
998{ 998{
999 int j; 999 int j;
1000 int ret; 1000 int ret;
1001 struct attribute **attrp, **attrq;
1002
1003 if (dev_info->event_conf_attrs && dev_info->event_conf_attrs[i].attrs) {
1004 attrp = dev_info->event_conf_attrs[i].attrs;
1005 while (*attrp) {
1006 ret = sysfs_add_file_to_group(&dev_info
1007 ->event_interfaces[0]
1008 .dev.kobj,
1009 *attrp,
1010 NULL);
1011 if (ret)
1012 goto error_ret;
1013 attrp++;
1014 }
1015 }
1016 INIT_LIST_HEAD(&dev_info->event_interfaces[0].dev_attr_list); 1001 INIT_LIST_HEAD(&dev_info->event_interfaces[0].dev_attr_list);
1017 /* Dynically created from the channels array */ 1002 /* Dynically created from the channels array */
1018 if (dev_info->channels) { 1003 if (dev_info->channels) {
@@ -1027,19 +1012,7 @@ static inline int __iio_add_event_config_attrs(struct iio_dev *dev_info, int i)
1027 return 0; 1012 return 0;
1028 1013
1029error_clear_attrs: 1014error_clear_attrs:
1030 __iio_remove_all_event_sysfs(dev_info, 1015 __iio_remove_all_event_sysfs(dev_info, NULL, i);
1031 NULL,
1032 i);
1033error_ret:
1034 attrq = dev_info->event_conf_attrs[i].attrs;
1035 while (attrq != attrp) {
1036 sysfs_remove_file_from_group(&dev_info
1037 ->event_interfaces[0]
1038 .dev.kobj,
1039 *attrq,
1040 NULL);
1041 attrq++;
1042 }
1043 1016
1044 return ret; 1017 return ret;
1045} 1018}
@@ -1047,23 +1020,7 @@ error_ret:
1047static inline int __iio_remove_event_config_attrs(struct iio_dev *dev_info, 1020static inline int __iio_remove_event_config_attrs(struct iio_dev *dev_info,
1048 int i) 1021 int i)
1049{ 1022{
1050 struct attribute **attrq; 1023 __iio_remove_all_event_sysfs(dev_info, NULL, i);
1051 __iio_remove_all_event_sysfs(dev_info,
1052 NULL,
1053 i);
1054 if (dev_info->event_conf_attrs
1055 && dev_info->event_conf_attrs[i].attrs) {
1056 attrq = dev_info->event_conf_attrs[i].attrs;
1057 while (*attrq) {
1058 sysfs_remove_file_from_group(&dev_info
1059 ->event_interfaces[0]
1060 .dev.kobj,
1061 *attrq,
1062 NULL);
1063 attrq++;
1064 }
1065 }
1066
1067 return 0; 1024 return 0;
1068} 1025}
1069 1026