atmel_serial: keep the platform_device unchanged

specify the port num via platform_data this will allow to match the clock
with the plaform_dev staticaly

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Цей коміт міститься в:
Jean-Christophe PLAGNIOL-VILLARD
2011-04-10 14:10:05 +08:00
джерело dd41d3216b
коміт 2b348e2f82
12 змінених файлів з 30 додано та 10 видалено

Переглянути файл

@@ -1109,6 +1109,7 @@ struct platform_device *atmel_default_console_device; /* the serial console devi
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
{
struct platform_device *pdev;
struct atmel_uart_data *pdata;
switch (id) {
case 0: /* DBGU */
@@ -1139,7 +1140,8 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
default:
return;
}
pdev->id = portnr; /* update to mapped ID */
pdata = pdev->dev.platform_data;
pdata->num = portnr; /* update to mapped ID */
if (portnr < ATMEL_MAX_UART)
at91_uarts[portnr] = pdev;