File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -870,7 +870,6 @@ static const struct iio_chan_spec adf4377_channels[] = {
870
870
static int adf4377_properties_parse (struct adf4377_state * st )
871
871
{
872
872
struct spi_device * spi = st -> spi ;
873
- const char * str ;
874
873
int ret ;
875
874
876
875
st -> clkin = devm_clk_get_enabled (& spi -> dev , "ref_in" );
@@ -896,16 +895,13 @@ static int adf4377_properties_parse(struct adf4377_state *st)
896
895
return dev_err_probe (& spi -> dev , PTR_ERR (st -> gpio_enclk2 ),
897
896
"failed to get the CE GPIO\n" );
898
897
899
- ret = device_property_read_string (& spi -> dev , "adi,muxout-select" , & str );
900
- if (ret ) {
901
- st -> muxout_select = ADF4377_MUXOUT_HIGH_Z ;
902
- } else {
903
- ret = match_string (adf4377_muxout_modes , ARRAY_SIZE (adf4377_muxout_modes ), str );
904
- if (ret < 0 )
905
- return ret ;
906
-
898
+ ret = device_property_match_property_string (& spi -> dev , "adi,muxout-select" ,
899
+ adf4377_muxout_modes ,
900
+ ARRAY_SIZE (adf4377_muxout_modes ));
901
+ if (ret >= 0 )
907
902
st -> muxout_select = ret ;
908
- }
903
+ else
904
+ st -> muxout_select = ADF4377_MUXOUT_HIGH_Z ;
909
905
910
906
return 0 ;
911
907
}
You can’t perform that action at this time.
0 commit comments