File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -937,7 +937,6 @@ static const struct attribute_group sca3000_attribute_group = {
937
937
938
938
static int sca3000_read_data (struct sca3000_state * st ,
939
939
u8 reg_address_high ,
940
- u8 * rx ,
941
940
int len )
942
941
{
943
942
int ret ;
@@ -947,18 +946,15 @@ static int sca3000_read_data(struct sca3000_state *st,
947
946
.tx_buf = st -> tx ,
948
947
}, {
949
948
.len = len ,
950
- .rx_buf = rx ,
949
+ .rx_buf = st -> rx ,
951
950
}
952
951
};
953
952
954
953
st -> tx [0 ] = SCA3000_READ_REG (reg_address_high );
955
954
ret = spi_sync_transfer (st -> us , xfer , ARRAY_SIZE (xfer ));
956
- if (ret ) {
955
+ if (ret )
957
956
dev_err (& st -> us -> dev , "problem reading register\n" );
958
- return ret ;
959
- }
960
-
961
- return 0 ;
957
+ return ret ;
962
958
}
963
959
964
960
/**
@@ -982,8 +978,7 @@ static void sca3000_ring_int_process(u8 val, struct iio_dev *indio_dev)
982
978
* num_available is the total number of samples available
983
979
* i.e. number of time points * number of channels.
984
980
*/
985
- ret = sca3000_read_data (st , SCA3000_REG_RING_OUT_ADDR , st -> rx ,
986
- num_available * 2 );
981
+ ret = sca3000_read_data (st , SCA3000_REG_RING_OUT_ADDR , num_available * 2 );
987
982
if (ret )
988
983
goto error_ret ;
989
984
for (i = 0 ; i < num_available / 3 ; i ++ ) {
You can’t perform that action at this time.
0 commit comments