[U-Boot] [PATCH] AT91: remove superfluous test in spi driver

Reinhard Meyer (-VC) reinhard.meyer at emk-elektronik.de
Fri Jul 30 11:53:41 CEST 2010


Let spi_cs_is_valid() alone make the decision

Signed-off-by: Reinhard Meyer <info at emk-elektronik.de>
---
 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 317c0b4..1a650ee 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -43,7 +43,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
 	u32			csrx;
 	void			*regs;
 
-	if (cs > 3 || !spi_cs_is_valid(bus, cs))
+	if (!spi_cs_is_valid(bus, cs))
 		return NULL;
 
 	switch (bus) {
-- 
1.5.6.5




More information about the U-Boot mailing list