staging: mt7621-mmc: Fix dma_map_sg may map to fewer entries
authorChristian Lütke-Stetzkamp <christian@lkamp.de>
Tue, 24 Apr 2018 18:01:24 +0000 (20:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 13:36:19 +0000 (15:36 +0200)
commitc302214c9d7d8c4f4f1ac82715ce952155355648
tree94f205e596a6d1bd2e1d388c7b474d0c57ca5f20
parent05e41c96a6deab303f8cf652a5ade253f6f1a2ca
staging: mt7621-mmc: Fix dma_map_sg may map to fewer entries

The dma_map_sg function may merge several sglist entries into one, the
return value has to be saved to consider that. The data->sg_count
field is the position, where it should be saved, like it is done in
other mmc host drivers. Also the count of mapped entries is needed for
the dma setup.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/sd.c