Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5938866 authored by Jonas Gorski's avatar Jonas Gorski Committed by Greg Kroah-Hartman
Browse files

serial/bcm63xx_uart: use correct alias naming



The bcm63xx_uart driver uses the of alias for determing its id. Recent
changes in dts files changed the expected 'uartX' to the recommended
'serialX', breaking serial output. Fix this by checking for a 'serialX'
alias as well.

Fixes: e3b992d0 ("MIPS: BMIPS: Improve BCM6328 device tree")
Fixes: 2d52ee82 ("MIPS: BMIPS: Improve BCM6368 device tree")
Fixes: 7537d273 ("MIPS: BMIPS: Add device tree example for BCM6358")
Signed-off-by: default avatarJonas Gorski <jogo@openwrt.org>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a10aebe2
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -813,8 +813,12 @@ static int bcm_uart_probe(struct platform_device *pdev)
	struct clk *clk;
	int ret;

	if (pdev->dev.of_node)
	if (pdev->dev.of_node) {
		pdev->id = of_alias_get_id(pdev->dev.of_node, "serial");

		if (pdev->id < 0)
			pdev->id = of_alias_get_id(pdev->dev.of_node, "uart");
	}

	if (pdev->id < 0 || pdev->id >= BCM63XX_NR_UARTS)
		return -EINVAL;