aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-10-16 12:11:12 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-10-16 14:46:38 -0400
commit222bad4745d4f6e6e86dc4ff37176f8b74fac23f (patch)
tree013da0fbd895411f0d931fb7ebaf47c529ffea1c
parent674f140b300a27550c02efef31b35a7add243c02 (diff)
downloadseabios-222bad4745d4f6e6e86dc4ff37176f8b74fac23f.zip
seabios-222bad4745d4f6e6e86dc4ff37176f8b74fac23f.tar.gz
seabios-222bad4745d4f6e6e86dc4ff37176f8b74fac23f.tar.bz2
usb: Rename send_default_control() to usb_send_default_control()
This is just function renaming - no code implementation changes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--src/hw/usb-hid.c4
-rw-r--r--src/hw/usb-hub.c8
-rw-r--r--src/hw/usb-msc.c2
-rw-r--r--src/hw/usb.c14
-rw-r--r--src/hw/usb.h4
5 files changed, 16 insertions, 16 deletions
diff --git a/src/hw/usb-hid.c b/src/hw/usb-hid.c
index 98f323e..09a6cf4 100644
--- a/src/hw/usb-hid.c
+++ b/src/hw/usb-hid.c
@@ -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
diff --git a/src/hw/usb-hub.c b/src/hw/usb-hub.c
index 4731a91..c21cbfb 100644
--- a/src/hw/usb-hub.c
+++ b/src/hw/usb-hub.c
@@ -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;
}
diff --git a/src/hw/usb-msc.c b/src/hw/usb-msc.c
index 55d5d63..388cbe5 100644
--- a/src/hw/usb-msc.c
+++ b/src/hw/usb-msc.c
@@ -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;
diff --git a/src/hw/usb.c b/src/hw/usb.c
index cfeeb8e..dfd2c89 100644
--- a/src/hw/usb.c
+++ b/src/hw/usb.c
@@ -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;
diff --git a/src/hw/usb.h b/src/hw/usb.h
index cadf543..bcbad77 100644
--- a/src/hw/usb.h
+++ b/src/hw/usb.h
@@ -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