aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-02-05 04:47:59 -0500
committerMark Brown <broonie@linaro.org>2014-02-07 07:20:37 -0500
commit9a7da6cc1d952b70284e34a594486045eadba8d5 (patch)
tree60b924a9db15a32b8a681d6baf8636414c3aa380 /drivers
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
spi: mxs: Use list_for_each_entry to iterate over transfer list
We don't modify the list entry while iterating the transfer list. So use list_for_each_entry instead of list_for_each_entry_safe. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-mxs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index 79e5aa2250c8..d3803198e166 100644
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -371,7 +371,7 @@ static int mxs_spi_transfer_one(struct spi_master *master,
371{ 371{
372 struct mxs_spi *spi = spi_master_get_devdata(master); 372 struct mxs_spi *spi = spi_master_get_devdata(master);
373 struct mxs_ssp *ssp = &spi->ssp; 373 struct mxs_ssp *ssp = &spi->ssp;
374 struct spi_transfer *t, *tmp_t; 374 struct spi_transfer *t;
375 unsigned int flag; 375 unsigned int flag;
376 int status = 0; 376 int status = 0;
377 377
@@ -381,7 +381,7 @@ static int mxs_spi_transfer_one(struct spi_master *master,
381 writel(mxs_spi_cs_to_reg(m->spi->chip_select), 381 writel(mxs_spi_cs_to_reg(m->spi->chip_select),
382 ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET); 382 ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
383 383
384 list_for_each_entry_safe(t, tmp_t, &m->transfers, transfer_list) { 384 list_for_each_entry(t, &m->transfers, transfer_list) {
385 385
386 status = mxs_spi_setup_transfer(m->spi, t); 386 status = mxs_spi_setup_transfer(m->spi, t);
387 if (status) 387 if (status)