atmel_serial: keep the platform_device unchanged
[pandora-kernel.git] / arch / arm / mach-at91 / at91sam9g45_devices.c
index 5e9f8a4..eee27ee 100644 (file)
@@ -1527,6 +1527,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 */
@@ -1557,7 +1558,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;