[ARM] 5077/1: spi: fix list scan success verification in PXA ssp driver
authorGuennadi Liakhovetski <lg@denx.de>
Thu, 5 Jun 2008 09:43:14 +0000 (10:43 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 11 Jun 2008 22:38:46 +0000 (23:38 +0100)
The list search success check in arch/arm/mach-pxa/ssp.c is wrong: for
example, it didn't recognise failure for me when I requested port 0.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pxa/ssp.c

index 00af7f2fed66e5e865c4262b0a58313ab251fd2e..0bb31982fb6f1b5b5ffb7d89e8a3bee28284c101 100644 (file)
@@ -330,7 +330,7 @@ struct ssp_device *ssp_request(int port, const char *label)
 
        mutex_unlock(&ssp_lock);
 
-       if (ssp->port_id != port)
+       if (&ssp->node == &ssp_list)
                return NULL;
 
        return ssp;