Skip to content

Commit

Permalink
mmc: mmc_spi: Convert to use for_each_sg()
Browse files Browse the repository at this point in the history
Use for_each_sg() macro instead of open coded variant.

No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Andy Shevchenko authored and Ulf Hansson committed Sep 11, 2019
1 parent 75eaf49 commit b8deb11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/mmc_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ mmc_spi_data_do(struct mmc_spi_host *host, struct mmc_command *cmd,
/* Handle scatterlist segments one at a time, with synch for
* each 512-byte block
*/
for (sg = data->sg, n_sg = data->sg_len; n_sg; n_sg--, sg++) {
for_each_sg(data->sg, sg, data->sg_len, n_sg) {
int status = 0;
dma_addr_t dma_addr = 0;
void *kmap_addr;
Expand Down

0 comments on commit b8deb11

Please sign in to comment.