2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-20 08:38:24 +08:00

avr32/at32ap: fix mapping of platform device id for USART

This patch will fix the mapping of the platform device id when mapping USART
peripheral ID to UART platform device id. Not setting the platform device id
will in most cases (when you map USART > 0 to UART 0) make the console not
available.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
This commit is contained in:
Hans-Christian Egtvedt 2011-06-08 10:47:25 +02:00
parent 7bbf1d46b2
commit 4137b31566

View File

@ -1043,6 +1043,7 @@ void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags)
data->regs = (void __iomem *)pdev->resource[0].start; data->regs = (void __iomem *)pdev->resource[0].start;
} }
pdev->id = line;
pdata = pdev->dev.platform_data; pdata = pdev->dev.platform_data;
pdata->num = line; pdata->num = line;
at32_usarts[line] = pdev; at32_usarts[line] = pdev;