[PATCH 4/5] atmel_spi: fix spi cs gpio request loop
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Mon Jan 14 11:36:11 EST 2013
it's 0 to num_cs - 1
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
drivers/spi/atmel_spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 08cb416..478f5d3 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -400,7 +400,7 @@ static int atmel_spi_probe(struct device_d *dev)
as->cs_pins = pdata->chipselect;
as->regs = dev_request_mem_region(dev, 0);
- for (i = 0; i <= master->num_chipselect; i++) {
+ for (i = 0; i < master->num_chipselect; i++) {
ret = gpio_request(as->cs_pins[i], dev_name(dev));
if (ret)
goto out_gpio;
--
1.7.10.4
More information about the barebox
mailing list