File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -497,17 +497,13 @@ static int tmag5273_set_operating_mode(struct tmag5273_data *data,
497
497
static void tmag5273_read_device_property (struct tmag5273_data * data )
498
498
{
499
499
struct device * dev = data -> dev ;
500
- const char * str ;
501
500
int ret ;
502
501
503
502
data -> angle_measurement = TMAG5273_ANGLE_EN_X_Y ;
504
503
505
- ret = device_property_read_string (dev , "ti,angle-measurement" , & str );
506
- if (ret )
507
- return ;
508
-
509
- ret = match_string (tmag5273_angle_names ,
510
- ARRAY_SIZE (tmag5273_angle_names ), str );
504
+ ret = device_property_match_property_string (dev , "ti,angle-measurement" ,
505
+ tmag5273_angle_names ,
506
+ ARRAY_SIZE (tmag5273_angle_names ));
511
507
if (ret >= 0 )
512
508
data -> angle_measurement = ret ;
513
509
}
You can’t perform that action at this time.
0 commit comments