Skip to contentSkip to conversation

AT91: remove superfluous test in spi driver

PATCH New Reinhard Meyer (-VC) 2 participants 2 messages Jul 30, 2010 – Aug 9, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 AT91: remove superfluous test in spi driver

Let spi_cs_is_valid() alone make the decision

---
 drivers/spi/atmel_spi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/spi/atmel_spi.c +1 -1
index 317c0b4..1a650ee 100644
@@ -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) {
Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 1/1 AT91: remove superfluous test in spi driver

Hi Reinhard Meyer,

Quoted 11 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Reinhard Meyer (-VC)
Sent: 2010?7?30? 17:54
To: u-boot
Subject: [U-Boot] [PATCH] AT91: remove superfluous test in spi driver

Let spi_cs_is_valid() alone make the decision

BR,
Eric

Quoted 7 lines
 drivers/spi/atmel_spi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/drivers/spi/atmel_spi.c index 317c0b4..1a650ee 100644

drivers/spi/atmel_spi.c +0 -0

[...]