From: Thomas Chou Date: Fri, 30 Oct 2015 15:18:14 +0800 Subject: [U-Boot] [PATCH 4/8] serial: altera_uart: minor clean up In-Reply-To: <1446189498-26549-1-git-send-email-thomas@wytron.com.tw> References: <1446189498-26549-1-git-send-email-thomas@wytron.com.tw> Message-ID: <1446189498-26549-4-git-send-email-thomas@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de - Moved macro definitions to top - Re-arrange header includes ascending order - Remove unused header linux/compiler.h - Remove the penultimate comma in of_match ids Signed-off-by: Thomas Chou --- drivers/serial/altera_uart.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index 7d5197a..cc68b1c 100644 --- a/drivers/serial/altera_uart.c +++ b/drivers/serial/altera_uart.c @@ -8,9 +8,15 @@ #include #include #include -#include -#include #include +#include + +DECLARE_GLOBAL_DATA_PTR; + +/* status register */ +#define ALTERA_UART_TMT BIT(5) /* tx empty */ +#define ALTERA_UART_TRDY BIT(6) /* tx ready */ +#define ALTERA_UART_RRDY BIT(7) /* rx ready */ struct altera_uart_regs { u32 rxdata; /* Rx data reg */ @@ -26,13 +32,6 @@ struct altera_uart_platdata { unsigned int uartclk; }; -/* status register */ -#define ALTERA_UART_TMT BIT(5) /* tx empty */ -#define ALTERA_UART_TRDY BIT(6) /* tx ready */ -#define ALTERA_UART_RRDY BIT(7) /* rx ready */ - -DECLARE_GLOBAL_DATA_PTR; - static int altera_uart_setbrg(struct udevice *dev, int baudrate) { struct altera_uart_platdata *plat = dev->platdata; @@ -106,7 +105,7 @@ static const struct dm_serial_ops altera_uart_ops = { }; static const struct udevice_id altera_uart_ids[] = { - { .compatible = "altr,uart-1.0", }, + { .compatible = "altr,uart-1.0" }, { } }; -- 2.5.0