]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/tty/serial/omap-serial.c
Merge tag 'tty-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[thirdparty/linux.git] / drivers / tty / serial / omap-serial.c
index 3dc14dcb01ca9c72db11681a72e057bd7d97ca1e..0ead88c5a19ad862523590b2a8f32786cf3877e7 100644 (file)
@@ -222,16 +222,11 @@ static inline int calculate_baud_abs_diff(struct uart_port *port,
                                unsigned int baud, unsigned int mode)
 {
        unsigned int n = port->uartclk / (mode * baud);
-       int abs_diff;
 
        if (n == 0)
                n = 1;
 
-       abs_diff = baud - (port->uartclk / (mode * n));
-       if (abs_diff < 0)
-               abs_diff = -abs_diff;
-
-       return abs_diff;
+       return abs_diff(baud, port->uartclk / (mode * n));
 }
 
 /*