spi: dw-mmio: allow multiple instances
authorBaruch Siach <baruch@tkos.co.il>
Sun, 26 Jan 2014 08:14:32 +0000 (10:14 +0200)
committerMark Brown <broonie@linaro.org>
Mon, 3 Feb 2014 12:19:59 +0000 (12:19 +0000)
Use the platform_device id to uniquely identify each SPI master instance.

Cc: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-dw-mmio.c

index 9af56cd..1492f5e 100644 (file)
@@ -66,7 +66,7 @@ static int dw_spi_mmio_probe(struct platform_device *pdev)
        if (ret)
                return ret;
 
-       dws->bus_num = 0;
+       dws->bus_num = pdev->id;
        dws->num_cs = 4;
        dws->max_freq = clk_get_rate(dwsmmio->clk);