[PATCH v5 3/6] usb: Update struct usb_device to indicate speed enum

Marek Vasut marex at denx.de
Wed Apr 8 16:43:39 CEST 2020


On 4/8/20 4:32 PM, Simon Glass wrote:
> The speed member actually uses an enum, so add this to the comment.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> 
> Changes in v5: None
> Changes in v4: None
> 
>  include/usb.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/usb.h b/include/usb.h
> index efb67ea33ff..7fa8182ba86 100644
> --- a/include/usb.h
> +++ b/include/usb.h
> @@ -103,7 +103,7 @@ enum {
>   */
>  struct usb_device {
>  	int	devnum;			/* Device number on USB bus */
> -	int	speed;			/* full/low/high */
> +	int	speed;			/* enum usb_device_speed */
>  	char	mf[32];			/* manufacturer */
>  	char	prod[32];		/* product */
>  	char	serial[32];		/* serial number */
> 

Why don't you then use the enum in this structure ?


More information about the U-Boot mailing list