X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fusb%2Fgadget%2Fmpc8xx_udc.c;h=ad5ea7a6b86007971f1616feca88e1962d4be22a;hb=8850c5d57c10aa6431d138d426e6e105c99cc7ba;hp=da3fbba72204564e7ca6a82fc7e560a36034cb41;hpb=f75a729b5c1434d5a5bbf453b1b699bf1c3ffbce;p=oweals%2Fu-boot.git diff --git a/drivers/usb/gadget/mpc8xx_udc.c b/drivers/usb/gadget/mpc8xx_udc.c index da3fbba722..ad5ea7a6b8 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" @@ -183,7 +170,7 @@ int udc_init (void) /* udc_irq * - * Poll for whatever events may have occured + * Poll for whatever events may have occurred */ void udc_irq (void) { @@ -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) {