spi: qcom: Fix spi probe issue

Cleared dynamically allocated region for spi global data
to avoid garbage values causing data abort.

Change-Id: Ie278cb3a1374d347d7dfb20b59059dfbf9a7ae42
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
This commit is contained in:
Varadarajan Narayanan 2017-06-15 14:40:06 +05:30 committed by Gokul Sriram Palanisamy
parent 6760565641
commit 3d9a317333
2 changed files with 3 additions and 7 deletions

View file

@ -162,6 +162,8 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
return NULL;
}
memset(ds, 0, sizeof(struct ipq_spi_slave));
/*
* QCA BLSP supports SPI Flash
* on different BLSP0 and BLSP1
@ -176,13 +178,6 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
}
ds->slave.bus = bus;
ds->slave.cs = cs;
ds->slave.memory_map = NULL;
ds->slave.option = 0;
ds->slave.max_write_size = 0;
ds->slave.op_mode_rx = 0;
ds->slave.op_mode_tx = 0;
ds->regs = &spi_reg[bus];
/* TODO For different clock frequency */

View file

@ -255,6 +255,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
return NULL;
}
memset(ds, 0, sizeof(struct ipq_spi_slave));
/*
* QCA BLSP supports SPI Flash
* on different BLSP0 and BLSP1