diff options
-rw-r--r-- | drivers/tty/serial/samsung.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index bf9301094c41..be405c6115ca 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c | |||
@@ -1275,11 +1275,18 @@ static inline struct s3c24xx_serial_drv_data *s3c24xx_get_driver_data( | |||
1275 | static int s3c24xx_serial_probe(struct platform_device *pdev) | 1275 | static int s3c24xx_serial_probe(struct platform_device *pdev) |
1276 | { | 1276 | { |
1277 | struct s3c24xx_uart_port *ourport; | 1277 | struct s3c24xx_uart_port *ourport; |
1278 | int index = probe_index; | ||
1278 | int ret; | 1279 | int ret; |
1279 | 1280 | ||
1280 | dbg("s3c24xx_serial_probe(%p) %d\n", pdev, probe_index); | 1281 | if (pdev->dev.of_node) { |
1282 | ret = of_alias_get_id(pdev->dev.of_node, "serial"); | ||
1283 | if (ret >= 0) | ||
1284 | index = ret; | ||
1285 | } | ||
1286 | |||
1287 | dbg("s3c24xx_serial_probe(%p) %d\n", pdev, index); | ||
1281 | 1288 | ||
1282 | ourport = &s3c24xx_serial_ports[probe_index]; | 1289 | ourport = &s3c24xx_serial_ports[index]; |
1283 | 1290 | ||
1284 | ourport->drv_data = s3c24xx_get_driver_data(pdev); | 1291 | ourport->drv_data = s3c24xx_get_driver_data(pdev); |
1285 | if (!ourport->drv_data) { | 1292 | if (!ourport->drv_data) { |
@@ -1295,7 +1302,7 @@ static int s3c24xx_serial_probe(struct platform_device *pdev) | |||
1295 | 1302 | ||
1296 | ourport->port.fifosize = (ourport->info->fifosize) ? | 1303 | ourport->port.fifosize = (ourport->info->fifosize) ? |
1297 | ourport->info->fifosize : | 1304 | ourport->info->fifosize : |
1298 | ourport->drv_data->fifosize[probe_index]; | 1305 | ourport->drv_data->fifosize[index]; |
1299 | 1306 | ||
1300 | probe_index++; | 1307 | probe_index++; |
1301 | 1308 | ||