]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/serial/usbtty.c
serial: pl01x: fix pl011 baud rate configuration
[karo-tx-uboot.git] / drivers / serial / usbtty.c
index 6b912efafdc74e07099a28b2e531968a0212fe3e..75f0ec31bbfb9a6faedeaf9cf137ea1212ceefd5 100644 (file)
@@ -389,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];
@@ -409,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 =
@@ -429,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;
@@ -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;
@@ -484,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;
@@ -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, (int)buf->size);
                        if (popnum == 0)
                                break;