Skip to contentSkip to conversation

spi: davinci: Remove duplicate code to set bus and cs for slave

PATCH New Axel Lin 2 participants 2 messages Jan 13, 2015 – Feb 17, 2015 SPI

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 spi: davinci: Remove duplicate code to set bus and cs for slave

It's done in spi_alloc_slave().

---
 drivers/spi/davinci_spi.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/spi/davinci_spi.c +0 -3
index 0ec5b9d..bf18362 100644
@@ -32,9 +32,6 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
 	if (!ds)
 		return NULL;
 
-	ds->slave.bus = bus;
-	ds->slave.cs = cs;
-
 	switch (bus) {
 	case SPI0_BUS:
 		ds->regs = (struct davinci_spi_regs *)SPI0_BASE;
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 spi: davinci: Remove duplicate code to set bus and cs for slave

Quoted 22 lines · Axel Lin

It's done in spi_alloc_slave().

---
 drivers/spi/davinci_spi.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/spi/davinci_spi.c +0 -4
index 0ec5b9d..bf18362 100644
@@ -32,9 +32,6 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
        if (!ds)
                return NULL;
 
-       ds->slave.bus = bus;
-       ds->slave.cs = cs;
-
        switch (bus) {
        case SPI0_BUS:
                ds->regs = (struct davinci_spi_regs *)SPI0_BASE;
--
Quoted 4 lines

1.9.1

Applied to u-boot-spi/master

thanks!

Signature · 1 line
Jagan.