mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
spi-imx: initialize complete config struct
Otherwise the config function uses random data from the stack. This didn't stick out because config is called once more in the chipselect function with correct parameters. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Sascha Hauer <[email protected]> Cc: David Brownell <[email protected]> Cc: Guennadi Liakhovetski <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4388eb1135
commit
d1c627b59c
1 changed files with 1 additions and 0 deletions
|
|
@ -442,6 +442,7 @@ static int spi_imx_setupxfer(struct spi_device *spi,
|
|||
config.bpw = t ? t->bits_per_word : spi->bits_per_word;
|
||||
config.speed_hz = t ? t->speed_hz : spi->max_speed_hz;
|
||||
config.mode = spi->mode;
|
||||
config.cs = spi_imx->chipselect[spi->chip_select];
|
||||
|
||||
if (!config.speed_hz)
|
||||
config.speed_hz = spi->max_speed_hz;
|
||||
|
|
|
|||
Loading…
Reference in a new issue