File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -107,19 +107,18 @@ EXPORT_SYMBOL_GPL(usb_speed_string);
107107 */
108108enum usb_device_speed usb_get_maximum_speed (struct device * dev )
109109{
110- const char * maximum_speed ;
110+ const char * p = "maximum-speed" ;
111111 int ret ;
112112
113- ret = device_property_read_string (dev , "maximum-speed" , & maximum_speed );
114- if (ret < 0 )
115- return USB_SPEED_UNKNOWN ;
116-
117- ret = match_string (ssp_rate , ARRAY_SIZE (ssp_rate ), maximum_speed );
113+ ret = device_property_match_property_string (dev , p , ssp_rate , ARRAY_SIZE (ssp_rate ));
118114 if (ret > 0 )
119115 return USB_SPEED_SUPER_PLUS ;
120116
121- ret = match_string (speed_names , ARRAY_SIZE (speed_names ), maximum_speed );
122- return (ret < 0 ) ? USB_SPEED_UNKNOWN : ret ;
117+ ret = device_property_match_property_string (dev , p , speed_names , ARRAY_SIZE (speed_names ));
118+ if (ret > 0 )
119+ return ret ;
120+
121+ return USB_SPEED_UNKNOWN ;
123122}
124123EXPORT_SYMBOL_GPL (usb_get_maximum_speed );
125124
You can’t perform that action at this time.
0 commit comments