dect
/
linux-2.6
Archived
13
0
Fork 0

Staging: iio/accel: Changed return type of lis3l02dq_read_event_config() to int

The lis3l02dq_read_event_config() function returned an ssize_t up to
now, which lead to a compiler warning in line 660 (initialization from
incompatible pointer type). The iio_info struct is defined to accept an
int-returning function as the read_event_config parameter.

Also it seems odd to have the check for (ret < 0) and return ret in
this case, when the return type is signed.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Andreas Ruprecht 2011-11-28 16:59:13 +01:00 committed by Greg Kroah-Hartman
parent c1fcc4c9bd
commit 28998e005b
1 changed files with 1 additions and 1 deletions

View File

@ -535,7 +535,7 @@ static struct iio_chan_spec lis3l02dq_channels[] = {
};
static ssize_t lis3l02dq_read_event_config(struct iio_dev *indio_dev,
static int lis3l02dq_read_event_config(struct iio_dev *indio_dev,
u64 event_code)
{