summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/usb
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2018-04-26 10:11:10 +0200
committerPatrick Georgi <pgeorgi@google.com>2018-05-02 07:59:14 +0000
commit00877386eec0e55d102864197fc29117f1159cb9 (patch)
treed9850b8757ccce87181b7ee6eecdaa2b104b5b63 /payloads/libpayload/drivers/usb
parent12f345d67161d4f28c1ead2ca950ba1f57e44035 (diff)
downloadcoreboot-00877386eec0e55d102864197fc29117f1159cb9.tar.xz
payloads/libpayload: Add spaces around '=='
Change-Id: Ie1da925aceb01c2d21b472bf171000803004578f Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/25856 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'payloads/libpayload/drivers/usb')
-rw-r--r--payloads/libpayload/drivers/usb/ehci.c2
-rw-r--r--payloads/libpayload/drivers/usb/ohci.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/payloads/libpayload/drivers/usb/ehci.c b/payloads/libpayload/drivers/usb/ehci.c
index 4636e7cc03..2df74adbd7 100644
--- a/payloads/libpayload/drivers/usb/ehci.c
+++ b/payloads/libpayload/drivers/usb/ehci.c
@@ -351,7 +351,7 @@ static int ehci_bulk (endpoint_t *ep, int size, u8 *src, int finalize)
u8 *end = src + size;
int remaining = size;
int endp = ep->endpoint & 0xf;
- int pid = (ep->direction==IN)?EHCI_IN:EHCI_OUT;
+ int pid = (ep->direction == IN)?EHCI_IN:EHCI_OUT;
int hubaddr = 0, hubport = 0;
if (ep->dev->speed < 2) {
diff --git a/payloads/libpayload/drivers/usb/ohci.c b/payloads/libpayload/drivers/usb/ohci.c
index 1d7d8308c2..0dfda17456 100644
--- a/payloads/libpayload/drivers/usb/ohci.c
+++ b/payloads/libpayload/drivers/usb/ohci.c
@@ -373,7 +373,7 @@ ohci_control (usbdev_t *dev, direction_t dir, int drlen, void *setup, int dalen,
int first_page = (unsigned long)data / 4096;
int last_page = (unsigned long)(data+dalen-1)/4096;
if (last_page < first_page) last_page = first_page;
- int pages = (dalen==0)?0:(last_page - first_page + 1);
+ int pages = (dalen == 0)?0:(last_page - first_page + 1);
/* First TD. */
td_t *const first_td = (td_t *)dma_memalign(sizeof(td_t), sizeof(td_t));
@@ -467,7 +467,7 @@ ohci_control (usbdev_t *dev, direction_t dir, int drlen, void *setup, int dalen,
OHCI_INST(dev->controller)->opreg->HcCommandStatus = ControlListFilled;
int result = wait_for_ed(dev, head,
- (dalen==0)?0:(last_page - first_page + 1));
+ (dalen == 0)?0:(last_page - first_page + 1));
/* Wait some frames before and one after disabling list access. */
mdelay(4);
OHCI_INST(dev->controller)->opreg->HcControl &= ~ControlListEnable;
@@ -509,7 +509,7 @@ ohci_bulk (endpoint_t *ep, int dalen, u8 *src, int finalize)
int first_page = (unsigned long)data / 4096;
int last_page = (unsigned long)(data+dalen-1)/4096;
if (last_page < first_page) last_page = first_page;
- int pages = (dalen==0)?0:(last_page - first_page + 1);
+ int pages = (dalen == 0)?0:(last_page - first_page + 1);
int td_count = (pages+1)/2;
if (finalize && ((dalen % ep->maxpacketsize) == 0)) {
@@ -571,7 +571,7 @@ ohci_bulk (endpoint_t *ep, int dalen, u8 *src, int finalize)
memset((void*)head, 0, sizeof(*head));
head->config = (ep->dev->address << ED_FUNC_SHIFT) |
((ep->endpoint & 0xf) << ED_EP_SHIFT) |
- (((ep->direction==IN)?OHCI_IN:OHCI_OUT) << ED_DIR_SHIFT) |
+ (((ep->direction == IN)?OHCI_IN:OHCI_OUT) << ED_DIR_SHIFT) |
(ep->dev->speed?ED_LOWSPEED:0) |
(ep->maxpacketsize << ED_MPS_SHIFT);
head->tail_pointer = virt_to_phys(cur);
@@ -588,7 +588,7 @@ ohci_bulk (endpoint_t *ep, int dalen, u8 *src, int finalize)
OHCI_INST(ep->dev->controller)->opreg->HcCommandStatus = BulkListFilled;
int result = wait_for_ed(ep->dev, head,
- (dalen==0)?0:(last_page - first_page + 1));
+ (dalen == 0)?0:(last_page - first_page + 1));
/* Wait some frames before and one after disabling list access. */
mdelay(4);
OHCI_INST(ep->dev->controller)->opreg->HcControl &= ~BulkListEnable;