[PATCH 1/1] atmel_spi: fix multiple instance support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sun Nov 4 13:42:32 EST 2012


use device id as bus num

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 drivers/spi/atmel_spi.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 4256572..353a24a 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -286,6 +286,7 @@ static int atmel_spi_probe(struct device_d *dev)
 
 	master = &as->master;
 	master->dev = dev;
+	master->bus_num = dev->id;
 
 	as->clk = clk_get(dev, "spi_clk");
 	if (IS_ERR(as->clk)) {
-- 
1.7.10.4




More information about the barebox mailing list