diff options
Diffstat (limited to 'drivers/tty/serial/efm32-uart.c')
| -rw-r--r-- | drivers/tty/serial/efm32-uart.c | 11 | 
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/tty/serial/efm32-uart.c b/drivers/tty/serial/efm32-uart.c index 0eb5b5673ed..3b0ee9afd76 100644 --- a/drivers/tty/serial/efm32-uart.c +++ b/drivers/tty/serial/efm32-uart.c @@ -407,7 +407,7 @@ static void efm32_uart_set_termios(struct uart_port *port,  	if (new->c_iflag & INPCK)  		port->read_status_mask |=  			UARTn_RXDATAX_FERR | UARTn_RXDATAX_PERR; -	if (new->c_iflag & (BRKINT | PARMRK)) +	if (new->c_iflag & (IGNBRK | BRKINT | PARMRK))  		port->read_status_mask |= SW_UARTn_RXDATAX_BERR;  	port->ignore_status_mask = 0; @@ -671,7 +671,10 @@ static int efm32_uart_probe_dt(struct platform_device *pdev,  	if (!np)  		return 1; -	ret = of_property_read_u32(np, "location", &location); +	ret = of_property_read_u32(np, "efm32,location", &location); +	if (ret) +		/* fall back to old and (wrongly) generic property "location" */ +		ret = of_property_read_u32(np, "location", &location);  	if (!ret) {  		if (location > 5) {  			dev_err(&pdev->dev, "invalid location\n"); @@ -795,6 +798,9 @@ static int efm32_uart_remove(struct platform_device *pdev)  static const struct of_device_id efm32_uart_dt_ids[] = {  	{ +		.compatible = "energymicro,efm32-uart", +	}, { +		/* doesn't follow the "vendor,device" scheme, don't use */  		.compatible = "efm32,uart",  	}, {  		/* sentinel */ @@ -836,6 +842,7 @@ static void __exit efm32_uart_exit(void)  	platform_driver_unregister(&efm32_uart_driver);  	uart_unregister_driver(&efm32_uart_reg);  } +module_exit(efm32_uart_exit);  MODULE_AUTHOR("Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>");  MODULE_DESCRIPTION("EFM32 UART/USART driver");  | 
