Skip to contentSkip to conversation

usb: Update struct usb_device to indicate speed enum

PATCH New Simon Glass 3 participants 5 messages May 10, 2020 – May 15, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/2 usb: Update struct usb_device to indicate speed enum

The speed member actually uses an enum, so add this to the comment.

---

Changes in v6:
- Use the enum directly in the struct

 include/usb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/usb.h +1 -1
index 22f6088fe6..fa9e09607e 100644
@@ -103,7 +103,7 @@ enum {
  */
 struct usb_device {
 	int	devnum;			/* Device number on USB bus */
-	int	speed;			/* full/low/high */
+	enum usb_device_speed speed;	/* full/low/high */
 	char	mf[32];			/* manufacturer */
 	char	prod[32];		/* product */
 	char	serial[32];		/* serial number */
Signature · 1 line
2.26.2.645.ge9eca65c58-goog
#1 lore raw

PATCH v6 2/2 pci: Fix typo in definition for PCI_DEV

Fix a typo in the comment.

---

Changes in v6: None

 include/pci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/pci.h +1 -1
index aff56b24f9..19c9244b94 100644
@@ -531,7 +531,7 @@ typedef int pci_dev_t;
  * This is relevant for the following macros:
  * PCI_DEV, PCI_FUNC, PCI_DEVFN
  * The U-Boot macro PCI_DEV is equivalent to the Linux PCI_SLOT version with
- * the remark from above (input d in bits 15-8 instead of 7-0.
+ * the remark from above (input is in bits 15-8 instead of 7-0.
  */
 #define PCI_DEV(d)		(((d) >> 11) & 0x1f)
 #define PCI_FUNC(d)		(((d) >> 8) & 0x7)
Signature · 1 line
2.26.2.645.ge9eca65c58-goog
#2 lore raw

PATCH v6 2/2 pci: Fix typo in definition for PCI_DEV

Quoted 3 lines · Simon Glass

Fix a typo in the comment.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200515/a2321aef/attachment.sig>
#4 lore raw

PATCH v6 1/2 usb: Update struct usb_device to indicate speed enum

In reply to Simon Glass
Quoted 4 lines · Simon Glass

The speed member actually uses an enum, so add this to the comment.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200515/1c717756/attachment.sig>