]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: iio/accel: Changed return type of lis3l02dq_read_event_config() to int
authorAndreas Ruprecht <rupran@einserver.de>
Mon, 28 Nov 2011 15:59:13 +0000 (16:59 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 30 Nov 2011 10:37:33 +0000 (19:37 +0900)
commit9415123de6a7d23153ee4cfad91fd8d290dd60f5
tree263f968c6551ba93bc47104833bd0593e1a1c0ba
parent8b37df53e1be2bc82c6c98521732c7aa317e6278
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>
drivers/staging/iio/accel/lis3l02dq_core.c