From a664ec9675d77aa2196e797afa5516d3e476da77 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 28 Mar 2011 13:57:11 +0200 Subject: [PATCH] serial: altera_uart: Scan for a free port if platform device id is -1 Devices extracted from device tree all seem to have pdev->id set to -1. Up until now we mapped all devices with id -1 to the first device. This behaviour could lead to problems when using more than one Altera UART in a system. This patch changes the behaviour of the driver to scan for the next free id in case the id is -1. Because we cannot refer back to the assigned id in altera_uart_remove, the port instance needs to be stored in device drvdata. Reported-by: David Smoot Cc: Anton Vorontsov Signed-off-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed