Skip to content

Commit

Permalink
Staging: iio/accel: Changed return type of lis3l02dq_read_event_confi…
Browse files Browse the repository at this point in the history
…g() 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>
  • Loading branch information
Andreas Ruprecht authored and Greg Kroah-Hartman committed Nov 30, 2011
1 parent c1fcc4c commit 28998e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/accel/lis3l02dq_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{

Expand Down

0 comments on commit 28998e0

Please sign in to comment.