Skip to content

Commit

Permalink
Staging: iio: industrialio-trigger.c: minor fixups
Browse files Browse the repository at this point in the history
We needed to include a header file that declared the functions that are
being exported in this file.

Also fix up an indentation problem, and some sparse warnings.

Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed May 11, 2010
1 parent 19ca92e commit 74112d3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions drivers/staging/iio/industrialio-trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "iio.h"
#include "trigger.h"
#include "trigger_consumer.h"

/* RFC - Question of approach
* Make the common case (single sensor single trigger)
Expand Down Expand Up @@ -92,9 +93,9 @@ static int iio_trigger_register_id(struct iio_trigger *trig_info)
**/
static void iio_trigger_unregister_id(struct iio_trigger *trig_info)
{
spin_lock(&iio_trigger_idr_lock);
idr_remove(&iio_trigger_idr, trig_info->id);
spin_unlock(&iio_trigger_idr_lock);
spin_lock(&iio_trigger_idr_lock);
idr_remove(&iio_trigger_idr, trig_info->id);
spin_unlock(&iio_trigger_idr_lock);
}

int iio_trigger_register(struct iio_trigger *trig_info)
Expand Down Expand Up @@ -334,9 +335,9 @@ static ssize_t iio_trigger_write_current(struct device *dev,
return len;
}

DEVICE_ATTR(current_trigger, S_IRUGO | S_IWUSR,
iio_trigger_read_current,
iio_trigger_write_current);
static DEVICE_ATTR(current_trigger, S_IRUGO | S_IWUSR,
iio_trigger_read_current,
iio_trigger_write_current);

static struct attribute *iio_trigger_consumer_attrs[] = {
&dev_attr_current_trigger.attr,
Expand Down

0 comments on commit 74112d3

Please sign in to comment.