]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/serial/usbtty.c
am33xx: Update DT files, add am335x_gp_evm_config target
[karo-tx-uboot.git] / drivers / serial / usbtty.c
index 8e0815334431a1c99b115e3f8a38bdb16a5fa869..75f0ec31bbfb9a6faedeaf9cf137ea1212ceefd5 100644 (file)
@@ -5,20 +5,7 @@
  * (C) Copyright 2006
  * Bryan O'Donoghue, bodonoghue@codehermit.ie
  *
- * 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+
  */
 
 #include <common.h>
@@ -402,7 +389,7 @@ static void str2wide (char *str, u16 * wide)
  * Test whether a character is in the RX buffer
  */
 
-int usbtty_tstc (void)
+int usbtty_tstc(struct stdio_dev *dev)
 {
        struct usb_endpoint_instance *endpoint =
                &endpoint_instance[rx_endpoint];
@@ -422,7 +409,7 @@ int usbtty_tstc (void)
  * written into its argument c.
  */
 
-int usbtty_getc (void)
+int usbtty_getc(struct stdio_dev *dev)
 {
        char c;
        struct usb_endpoint_instance *endpoint =
@@ -442,7 +429,7 @@ int usbtty_getc (void)
 /*
  * Output a single byte to the usb client port.
  */
-void usbtty_putc (const char c)
+void usbtty_putc(struct stdio_dev *dev, const char c)
 {
        if (!usbtty_configured ())
                return;
@@ -488,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;
@@ -497,7 +484,7 @@ static void __usbtty_puts (const char *str, int len)
        }
 }
 
-void usbtty_puts (const char *str)
+void usbtty_puts(struct stdio_dev *dev, const char *str)
 {
        int n;
        int len;
@@ -895,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, (int)buf->size);
                        if (popnum == 0)
                                break;