From: Andreas Ruprecht Date: Mon, 28 Nov 2011 15:59:13 +0000 (+0100) Subject: Staging: iio/accel: Changed return type of lis3l02dq_read_event_config() to int X-Git-Tag: v3.2.95~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d09fa59c00edc5ece383ce5426d2e88fef7448a4;p=thirdparty%2Fkernel%2Fstable.git Staging: iio/accel: Changed return type of lis3l02dq_read_event_config() to int commit 28998e005bb669b60de0e432d6f142267f5c1403 upstream. 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 Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ben Hutchings --- diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c index 559545a423335..84145a4fee9fd 100644 --- a/drivers/staging/iio/accel/lis3l02dq_core.c +++ b/drivers/staging/iio/accel/lis3l02dq_core.c @@ -534,7 +534,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) {