Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249846
b: refs/heads/master
c: 41c7752
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed May 19, 2011
1 parent 4de3edb commit b3d664e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 59 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f785681a87068f123d3e23da13b2c55ab4f93ac
refs/heads/master: 41c775240a78fac3e2bd7f024c3cf0d61547249e
13 changes: 0 additions & 13 deletions trunk/drivers/staging/iio/iio.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
/* Event interface flags */
#define IIO_BUSY_BIT_POS 1

struct iio_dev;

/* naughty temporary hack to match these against the event version
- need to flattern these together */
enum iio_chan_type {
Expand Down Expand Up @@ -221,7 +219,6 @@ static inline s64 iio_get_time_ns(void)
* ownership of chrdevs etc
* @num_interrupt_lines:[DRIVER] number of physical interrupt lines from device
* @event_attrs: [DRIVER] event control attributes
* @event_conf_attrs: [DRIVER] event configuration attributes
* @event_interfaces: [INTERN] event chrdevs associated with interrupt lines
* @ring: [DRIVER] any ring buffer present
* @mlock: [INTERN] lock used to prevent simultaneous device state
Expand Down Expand Up @@ -259,8 +256,6 @@ struct iio_dev {

int num_interrupt_lines;
struct attribute_group *event_attrs;
struct attribute_group *event_conf_attrs;

struct iio_event_interface *event_interfaces;

struct iio_ring_buffer *ring;
Expand Down Expand Up @@ -326,14 +321,6 @@ int iio_push_event(struct iio_dev *dev_info,
int ev_code,
s64 timestamp);

/**
* iio_allocate_chrdev() - Allocate a chrdev
* @handler: struct that contains relevant file handling for chrdev
* @dev_info: iio_dev for which chrdev is being created
**/
int iio_allocate_chrdev(struct iio_handler *handler, struct iio_dev *dev_info);
void iio_deallocate_chrdev(struct iio_handler *handler);

/* Used to distinguish between bipolar and unipolar scan elemenents.
* Whilst this may seem obvious, we may well want to change the representation
* in the future!*/
Expand Down
47 changes: 2 additions & 45 deletions trunk/drivers/staging/iio/industrialio-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -1027,43 +1012,15 @@ 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;
}

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;
}

Expand Down

0 comments on commit b3d664e

Please sign in to comment.