X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fusb%2Fgadget%2Fmpc8xx_udc.c;h=b3e178abefb457cd801ee78994b54c4dd95b51b7;hb=e8d056989a7302eda4e3ed263a375fd175a4e15f;hp=da3fbba72204564e7ca6a82fc7e560a36034cb41;hpb=f75a729b5c1434d5a5bbf453b1b699bf1c3ffbce;p=u-boot diff --git a/drivers/usb/gadget/mpc8xx_udc.c b/drivers/usb/gadget/mpc8xx_udc.c index da3fbba722..b3e178abef 100644 --- a/drivers/usb/gadget/mpc8xx_udc.c +++ b/drivers/usb/gadget/mpc8xx_udc.c @@ -6,21 +6,7 @@ * DasUBoot/drivers/usb/gadget/omap1510_udc.c, for design and implementation * ideas. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * SPDX-License-Identifier: GPL-2.0+ */ /* @@ -61,6 +47,7 @@ #include #include #include +#include #include "ep0.h" @@ -910,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++) { @@ -955,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) {