[SeaBIOS] [PATCH 03/11] usb: Rename findEndPointDesc() to usb_find_desc()

Kevin O'Connor kevin at koconnor.net
Thu Oct 16 22:22:55 CEST 2014


This is just function renaming - no code implementation changes.

Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
 src/hw/usb-hid.c | 2 +-
 src/hw/usb-msc.c | 4 ++--
 src/hw/usb.c     | 4 ++--
 src/hw/usb.h     | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/hw/usb-hid.c b/src/hw/usb-hid.c
index 13f134c..98f323e 100644
--- a/src/hw/usb-hid.c
+++ b/src/hw/usb-hid.c
@@ -119,7 +119,7 @@ usb_hid_setup(struct usbdevice_s *usbdev)
         return -1;
 
     // Find intr in endpoint.
-    struct usb_endpoint_descriptor *epdesc = findEndPointDesc(
+    struct usb_endpoint_descriptor *epdesc = usb_find_desc(
         usbdev, USB_ENDPOINT_XFER_INT, USB_DIR_IN);
     if (!epdesc) {
         dprintf(1, "No usb hid intr in?\n");
diff --git a/src/hw/usb-msc.c b/src/hw/usb-msc.c
index a7af9a7..55d5d63 100644
--- a/src/hw/usb-msc.c
+++ b/src/hw/usb-msc.c
@@ -189,9 +189,9 @@ usb_msc_setup(struct usbdevice_s *usbdev)
 
     // Find bulk in and bulk out endpoints.
     struct usb_pipe *inpipe = NULL, *outpipe = NULL;
-    struct usb_endpoint_descriptor *indesc = findEndPointDesc(
+    struct usb_endpoint_descriptor *indesc = usb_find_desc(
         usbdev, USB_ENDPOINT_XFER_BULK, USB_DIR_IN);
-    struct usb_endpoint_descriptor *outdesc = findEndPointDesc(
+    struct usb_endpoint_descriptor *outdesc = usb_find_desc(
         usbdev, USB_ENDPOINT_XFER_BULK, USB_DIR_OUT);
     if (!indesc || !outdesc)
         goto fail;
diff --git a/src/hw/usb.c b/src/hw/usb.c
index 720e8b0..cfeeb8e 100644
--- a/src/hw/usb.c
+++ b/src/hw/usb.c
@@ -200,9 +200,9 @@ usb_xfer_time(struct usb_pipe *pipe, int datalen)
     return USB_TIME_COMMAND + 100;
 }
 
-// Find the first endpoing of a given type in an interface description.
+// Find the first endpoint of a given type in an interface description.
 struct usb_endpoint_descriptor *
-findEndPointDesc(struct usbdevice_s *usbdev, int type, int dir)
+usb_find_desc(struct usbdevice_s *usbdev, int type, int dir)
 {
     struct usb_endpoint_descriptor *epdesc = (void*)&usbdev->iface[1];
     for (;;) {
diff --git a/src/hw/usb.h b/src/hw/usb.h
index 0d07032..cadf543 100644
--- a/src/hw/usb.h
+++ b/src/hw/usb.h
@@ -242,8 +242,8 @@ void usb_desc2pipe(struct usb_pipe *pipe, struct usbdevice_s *usbdev
 int usb_get_period(struct usbdevice_s *usbdev
                    , struct usb_endpoint_descriptor *epdesc);
 int usb_xfer_time(struct usb_pipe *pipe, int datalen);
-struct usb_endpoint_descriptor *findEndPointDesc(struct usbdevice_s *usbdev
-                                                 , int type, int dir);
+struct usb_endpoint_descriptor *usb_find_desc(struct usbdevice_s *usbdev
+                                              , int type, int dir);
 void usb_enumerate(struct usbhub_s *hub);
 void usb_setup(void);
 
-- 
1.9.3




More information about the SeaBIOS mailing list