]> xenbits.xensource.com Git - seabios.git/commitdiff
usb: Rename send_default_control() to usb_send_default_control()
authorKevin O'Connor <kevin@koconnor.net>
Thu, 16 Oct 2014 16:11:12 +0000 (12:11 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 16 Oct 2014 18:46:38 +0000 (14:46 -0400)
This is just function renaming - no code implementation changes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/hw/usb-hid.c
src/hw/usb-hub.c
src/hw/usb-msc.c
src/hw/usb.c
src/hw/usb.h

index 98f323e3b3936e47c763727139ef9271168406ea..09a6cf455e01668e805881c6afe3f044cb901d7c 100644 (file)
@@ -30,7 +30,7 @@ set_protocol(struct usb_pipe *pipe, u16 val)
     req.wValue = val;
     req.wIndex = 0;
     req.wLength = 0;
-    return send_default_control(pipe, &req, NULL);
+    return usb_send_default_control(pipe, &req, NULL);
 }
 
 // Send USB HID SetIdle request.
@@ -43,7 +43,7 @@ set_idle(struct usb_pipe *pipe, int ms)
     req.wValue = (ms/4)<<8;
     req.wIndex = 0;
     req.wLength = 0;
-    return send_default_control(pipe, &req, NULL);
+    return usb_send_default_control(pipe, &req, NULL);
 }
 
 #define KEYREPEATWAITMS 500
index 4731a91c9a7aede80e8ae4d66cf76251be949d46..c21cbfb9dac3e9641c04a9e80401963531aee8d5 100644 (file)
@@ -20,7 +20,7 @@ get_hub_desc(struct usb_pipe *pipe, struct usb_hub_descriptor *desc)
     req.wValue = USB_DT_HUB<<8;
     req.wIndex = 0;
     req.wLength = sizeof(*desc);
-    return send_default_control(pipe, &req, desc);
+    return usb_send_default_control(pipe, &req, desc);
 }
 
 static int
@@ -33,7 +33,7 @@ set_port_feature(struct usbhub_s *hub, int port, int feature)
     req.wIndex = port + 1;
     req.wLength = 0;
     mutex_lock(&hub->lock);
-    int ret = send_default_control(hub->usbdev->defpipe, &req, NULL);
+    int ret = usb_send_default_control(hub->usbdev->defpipe, &req, NULL);
     mutex_unlock(&hub->lock);
     return ret;
 }
@@ -48,7 +48,7 @@ clear_port_feature(struct usbhub_s *hub, int port, int feature)
     req.wIndex = port + 1;
     req.wLength = 0;
     mutex_lock(&hub->lock);
-    int ret = send_default_control(hub->usbdev->defpipe, &req, NULL);
+    int ret = usb_send_default_control(hub->usbdev->defpipe, &req, NULL);
     mutex_unlock(&hub->lock);
     return ret;
 }
@@ -63,7 +63,7 @@ get_port_status(struct usbhub_s *hub, int port, struct usb_port_status *sts)
     req.wIndex = port + 1;
     req.wLength = sizeof(*sts);
     mutex_lock(&hub->lock);
-    int ret = send_default_control(hub->usbdev->defpipe, &req, sts);
+    int ret = usb_send_default_control(hub->usbdev->defpipe, &req, sts);
     mutex_unlock(&hub->lock);
     return ret;
 }
index 55d5d630de6fe86706f6835ad14f298a648f4faf..388cbe5caed306964021a1625b4be923ad431bd6 100644 (file)
@@ -130,7 +130,7 @@ usb_msc_maxlun(struct usb_pipe *pipe)
     req.wIndex = 0;
     req.wLength = 1;
     unsigned char maxlun;
-    int ret = send_default_control(pipe, &req, &maxlun);
+    int ret = usb_send_default_control(pipe, &req, &maxlun);
     if (ret)
         return 0;
     return maxlun;
index cfeeb8ee89bb9303bbca10fa977914e2f6030575..dfd2c89b6729cb2135fa89b193f6127e9e7df2d0 100644 (file)
@@ -125,8 +125,8 @@ int usb_32bit_pipe(struct usb_pipe *pipe_fl)
 
 // Send a message to the default control pipe of a device.
 int
-send_default_control(struct usb_pipe *pipe, const struct usb_ctrlrequest *req
-                     , void *data)
+usb_send_default_control(struct usb_pipe *pipe, const struct usb_ctrlrequest *req
+                         , void *data)
 {
     return usb_send_control(pipe, req->bRequestType & USB_DIR_IN
                             , req, sizeof(*req), data, req->wLength);
@@ -228,7 +228,7 @@ get_device_info8(struct usb_pipe *pipe, struct usb_device_descriptor *dinfo)
     req.wValue = USB_DT_DEVICE<<8;
     req.wIndex = 0;
     req.wLength = 8;
-    return send_default_control(pipe, &req, dinfo);
+    return usb_send_default_control(pipe, &req, dinfo);
 }
 
 static struct usb_config_descriptor *
@@ -242,7 +242,7 @@ get_device_config(struct usb_pipe *pipe)
     req.wValue = USB_DT_CONFIG<<8;
     req.wIndex = 0;
     req.wLength = sizeof(cfg);
-    int ret = send_default_control(pipe, &req, &cfg);
+    int ret = usb_send_default_control(pipe, &req, &cfg);
     if (ret)
         return NULL;
 
@@ -250,7 +250,7 @@ get_device_config(struct usb_pipe *pipe)
     if (!config)
         return NULL;
     req.wLength = cfg.wTotalLength;
-    ret = send_default_control(pipe, &req, config);
+    ret = usb_send_default_control(pipe, &req, config);
     if (ret)
         return NULL;
     //hexdump(config, cfg.wTotalLength);
@@ -266,7 +266,7 @@ set_configuration(struct usb_pipe *pipe, u16 val)
     req.wValue = val;
     req.wIndex = 0;
     req.wLength = 0;
-    return send_default_control(pipe, &req, NULL);
+    return usb_send_default_control(pipe, &req, NULL);
 }
 
 
@@ -310,7 +310,7 @@ usb_set_address(struct usbdevice_s *usbdev)
     req.wValue = cntl->maxaddr + 1;
     req.wIndex = 0;
     req.wLength = 0;
-    int ret = send_default_control(usbdev->defpipe, &req, NULL);
+    int ret = usb_send_default_control(usbdev->defpipe, &req, NULL);
     if (ret) {
         free_pipe(usbdev->defpipe);
         return -1;
index cadf5431f41d0161fbeb6690160a2fdfb4d8ba53..bcbad77d248e006a42938560da271167a8b676cf 100644 (file)
@@ -233,8 +233,8 @@ struct usb_pipe *usb_alloc_pipe(struct usbdevice_s *usbdev
 int usb_send_bulk(struct usb_pipe *pipe, int dir, void *data, int datasize);
 int usb_poll_intr(struct usb_pipe *pipe, void *data);
 int usb_32bit_pipe(struct usb_pipe *pipe_fl);
-int send_default_control(struct usb_pipe *pipe, const struct usb_ctrlrequest *req
-                         , void *data);
+int usb_send_default_control(struct usb_pipe *pipe
+                             , const struct usb_ctrlrequest *req, void *data);
 void free_pipe(struct usb_pipe *pipe);
 struct usb_pipe *usb_getFreePipe(struct usb_s *cntl, u8 eptype);
 void usb_desc2pipe(struct usb_pipe *pipe, struct usbdevice_s *usbdev