From: Tobias Klauser Date: Mon, 28 Mar 2011 11:57:11 +0000 (+0200) Subject: serial: altera_uart: Scan for a free port if platform device id is -1 X-Git-Tag: v3.0-rc1~338^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a664ec9675d77aa2196e797afa5516d3e476da77;p=pandora-kernel.git 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-diff-tree failed