diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-01-13 02:31:02 +0800 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-01-15 00:26:19 +0800 |
commit | 8e92f54ad4e9a241e700b2efc91d6d9c62628484 (patch) | |
tree | 4a88073f5195056b38d6185c511b5e1ac5c70263 /drivers/spi/atmel_spi.c | |
parent | e3adde61c10f7982a31ae79c4cf13ba096624c55 (diff) | |
download | barebox-8e92f54ad4e9a241e700b2efc91d6d9c62628484.tar.gz barebox-8e92f54ad4e9a241e700b2efc91d6d9c62628484.tar.xz |
atmel_spi: fix spi cs gpio request loop
it's 0 to num_cs - 1
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers/spi/atmel_spi.c')
-rw-r--r-- | drivers/spi/atmel_spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index 08cb4169ea..478f5d3b61 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; |