Skip to content

Commit

Permalink
serial/bcm63xx_uart: use correct alias naming
Browse files Browse the repository at this point in the history
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: e3b992d ("MIPS: BMIPS: Improve BCM6328 device tree")
Fixes: 2d52ee8 ("MIPS: BMIPS: Improve BCM6368 device tree")
Fixes: 7537d27 ("MIPS: BMIPS: Add device tree example for BCM6358")
Signed-off-by: Jonas Gorski <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
KanjiMonster authored and gregkh committed Jun 25, 2016
1 parent a10aebe commit a593886
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/tty/serial/bcm63xx_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,8 +813,12 @@ static int bcm_uart_probe(struct platform_device *pdev)
struct clk *clk;
int ret;

if (pdev->dev.of_node)
pdev->id = of_alias_get_id(pdev->dev.of_node, "uart");
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;
Expand Down

0 comments on commit a593886

Please sign in to comment.