]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/gadget/mpc8xx_udc.c
Fix spelling of "occurred".
[u-boot] / drivers / usb / gadget / mpc8xx_udc.c
index da3fbba72204564e7ca6a82fc7e560a36034cb41..ad5ea7a6b86007971f1616feca88e1962d4be22a 100644 (file)
@@ -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 <commproc.h>
 #include <usbdevice.h>
 #include <usb/mpc8xx_udc.h>
+#include <usb/udc.h>
 
 #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) {