summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-09-18 13:28:06 +0900
committerTom Rini <trini@ti.com>2014-09-24 18:30:29 -0400
commitc79cba37b3b42cf8fbd71babcd8998867f76fead (patch)
tree52e446aa0b8c3a623715da84b0fc9bdbd4826c0d /drivers
parent87f13aa00d0279fcc96530404c3a104eb4cb1672 (diff)
downloadu-boot-imx-c79cba37b3b42cf8fbd71babcd8998867f76fead.zip
u-boot-imx-c79cba37b3b42cf8fbd71babcd8998867f76fead.tar.gz
u-boot-imx-c79cba37b3b42cf8fbd71babcd8998867f76fead.tar.bz2
cosmetic: replace MIN, MAX with min, max
The macro MIN, MAX is defined as the aliase of min, max, respectively. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/fsl_dma.c2
-rw-r--r--drivers/i2c/ihs_i2c.c4
-rw-r--r--drivers/mmc/fsl_esdhc.c2
-rw-r--r--drivers/serial/usbtty.c4
-rw-r--r--drivers/usb/gadget/designware_udc.c4
-rw-r--r--drivers/usb/gadget/ep0.c2
-rw-r--r--drivers/usb/gadget/mpc8xx_udc.c4
-rw-r--r--drivers/usb/gadget/pxa27x_udc.c2
8 files changed, 12 insertions, 12 deletions
diff --git a/drivers/dma/fsl_dma.c b/drivers/dma/fsl_dma.c
index 45e49c7..7ef7f12 100644
--- a/drivers/dma/fsl_dma.c
+++ b/drivers/dma/fsl_dma.c
@@ -96,7 +96,7 @@ int dmacpy(phys_addr_t dest, phys_addr_t src, phys_size_t count) {
uint xfer_size;
while (count) {
- xfer_size = MIN(FSL_DMA_MAX_SIZE, count);
+ xfer_size = min(FSL_DMA_MAX_SIZE, count);
out_dma32(&dma->dar, (u32) (dest & 0xFFFFFFFF));
out_dma32(&dma->sar, (u32) (src & 0xFFFFFFFF));
diff --git a/drivers/i2c/ihs_i2c.c b/drivers/i2c/ihs_i2c.c
index fe66ce2..19fbe59 100644
--- a/drivers/i2c/ihs_i2c.c
+++ b/drivers/i2c/ihs_i2c.c
@@ -84,7 +84,7 @@ static int ihs_i2c_address(uchar chip, uint addr, int alen, bool hold_bus)
int shift = (alen-1) * 8;
while (alen) {
- int transfer = MIN(alen, 2);
+ int transfer = min(alen, 2);
uchar buf[2];
bool is_last = alen <= transfer;
@@ -113,7 +113,7 @@ static int ihs_i2c_access(struct i2c_adapter *adap, uchar chip, uint addr,
return 1;
while (len) {
- int transfer = MIN(len, 2);
+ int transfer = min(len, 2);
if (ihs_i2c_transfer(chip, buffer, transfer, read,
len <= transfer))
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 97d0389..2640607 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -610,7 +610,7 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
#endif
cfg->cfg.f_min = 400000;
- cfg->cfg.f_max = MIN(gd->arch.sdhc_clk, 52000000);
+ cfg->cfg.f_max = min(gd->arch.sdhc_clk, 52000000);
cfg->cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
index b030526..7fb0b92 100644
--- a/drivers/serial/usbtty.c
+++ b/drivers/serial/usbtty.c
@@ -475,7 +475,7 @@ static void __usbtty_puts (const char *str, int len)
if (space) {
write_buffer (&usbtty_output);
- n = MIN (space, MIN (len, maxlen));
+ n = min(space, min(len, maxlen));
buf_push (&usbtty_output, str, n);
str += n;
@@ -882,7 +882,7 @@ static int write_buffer (circbuf_t * buf)
space_avail =
current_urb->buffer_length -
current_urb->actual_length;
- popnum = MIN (space_avail, buf->size);
+ popnum = min(space_avail, buf->size);
if (popnum == 0)
break;
diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c
index b7c1038..3559400 100644
--- a/drivers/usb/gadget/designware_udc.c
+++ b/drivers/usb/gadget/designware_udc.c
@@ -269,7 +269,7 @@ static void dw_write_noniso_tx_fifo(struct usb_endpoint_instance
UDCDBGA("urb->buffer %p, buffer_length %d, actual_length %d",
urb->buffer, urb->buffer_length, urb->actual_length);
- last = MIN(urb->actual_length - endpoint->sent,
+ last = min(urb->actual_length - endpoint->sent,
endpoint->tx_packetSize);
if (last) {
@@ -285,7 +285,7 @@ static void dw_write_noniso_tx_fifo(struct usb_endpoint_instance
align = ((ulong)cp % sizeof(int));
if (align)
- last = MIN(last, sizeof(int) - align);
+ last = min(last, sizeof(int) - align);
UDCDBGA("endpoint->sent %d, tx_packetSize %d, last %d",
endpoint->sent, endpoint->tx_packetSize, last);
diff --git a/drivers/usb/gadget/ep0.c b/drivers/usb/gadget/ep0.c
index b321488..4ba2f3d 100644
--- a/drivers/usb/gadget/ep0.c
+++ b/drivers/usb/gadget/ep0.c
@@ -315,7 +315,7 @@ static int ep0_get_descriptor (struct usb_device_instance *device,
/*copy_config(urb, &report_descriptor->bData[0], report_descriptor->wLength, max); */
if (max - urb->actual_length > 0) {
int length =
- MIN (report_descriptor->wLength,
+ min(report_descriptor->wLength,
max - urb->actual_length);
memcpy (urb->buffer + urb->actual_length,
&report_descriptor->bData[0], length);
diff --git a/drivers/usb/gadget/mpc8xx_udc.c b/drivers/usb/gadget/mpc8xx_udc.c
index 7f72972..b3e178a 100644
--- a/drivers/usb/gadget/mpc8xx_udc.c
+++ b/drivers/usb/gadget/mpc8xx_udc.c
@@ -897,7 +897,7 @@ static int mpc8xx_udc_ep_tx (struct usb_endpoint_instance *epi)
pkt_len = urb->actual_length - epi->sent;
if (pkt_len > epi->tx_packetSize || pkt_len > EP_MAX_PKT) {
- pkt_len = MIN (epi->tx_packetSize, EP_MAX_PKT);
+ pkt_len = min(epi->tx_packetSize, EP_MAX_PKT);
}
for (x = 0; x < pkt_len; x++) {
@@ -942,7 +942,7 @@ static int mpc8xx_udc_ep_tx (struct usb_endpoint_instance *epi)
/* TX ACK : USB 2.0 8.7.2, Toggle PID, Advance TX */
epi->sent += pkt_len;
- epi->last = MIN (urb->actual_length - epi->sent, epi->tx_packetSize);
+ epi->last = min(urb->actual_length - epi->sent, epi->tx_packetSize);
TOGGLE_TX_PID (ep_ref[ep].pid);
if (epi->sent >= epi->tx_urb->actual_length) {
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 733558d..efd5c7f 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -65,7 +65,7 @@ static int udc_write_urb(struct usb_endpoint_instance *endpoint)
if (!urb || !urb->actual_length)
return -1;
- n = MIN(urb->actual_length - endpoint->sent, endpoint->tx_packetSize);
+ n = min(urb->actual_length - endpoint->sent, endpoint->tx_packetSize);
if (n <= 0)
return -1;