diff options
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r-- | drivers/mmc/card/block.c | 4 | ||||
-rw-r--r-- | drivers/mmc/card/mmc_test.c | 12 |
2 files changed, 4 insertions, 12 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index fb387c803205..adf0ed3f2c08 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -259,7 +259,7 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) | |||
259 | u32 result; | 259 | u32 result; |
260 | __be32 *blocks; | 260 | __be32 *blocks; |
261 | 261 | ||
262 | struct mmc_request mrq; | 262 | struct mmc_request mrq = {0}; |
263 | struct mmc_command cmd = {0}; | 263 | struct mmc_command cmd = {0}; |
264 | struct mmc_data data = {0}; | 264 | struct mmc_data data = {0}; |
265 | unsigned int timeout_us; | 265 | unsigned int timeout_us; |
@@ -300,8 +300,6 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) | |||
300 | data.sg = &sg; | 300 | data.sg = &sg; |
301 | data.sg_len = 1; | 301 | data.sg_len = 1; |
302 | 302 | ||
303 | memset(&mrq, 0, sizeof(struct mmc_request)); | ||
304 | |||
305 | mrq.cmd = &cmd; | 303 | mrq.cmd = &cmd; |
306 | mrq.data = &data; | 304 | mrq.data = &data; |
307 | 305 | ||
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index f44762b6e592..35252c1e7a20 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c | |||
@@ -246,15 +246,13 @@ static int mmc_test_buffer_transfer(struct mmc_test_card *test, | |||
246 | { | 246 | { |
247 | int ret; | 247 | int ret; |
248 | 248 | ||
249 | struct mmc_request mrq; | 249 | struct mmc_request mrq = {0}; |
250 | struct mmc_command cmd = {0}; | 250 | struct mmc_command cmd = {0}; |
251 | struct mmc_command stop = {0}; | 251 | struct mmc_command stop = {0}; |
252 | struct mmc_data data = {0}; | 252 | struct mmc_data data = {0}; |
253 | 253 | ||
254 | struct scatterlist sg; | 254 | struct scatterlist sg; |
255 | 255 | ||
256 | memset(&mrq, 0, sizeof(struct mmc_request)); | ||
257 | |||
258 | mrq.cmd = &cmd; | 256 | mrq.cmd = &cmd; |
259 | mrq.data = &data; | 257 | mrq.data = &data; |
260 | mrq.stop = &stop; | 258 | mrq.stop = &stop; |
@@ -728,13 +726,11 @@ static int mmc_test_simple_transfer(struct mmc_test_card *test, | |||
728 | struct scatterlist *sg, unsigned sg_len, unsigned dev_addr, | 726 | struct scatterlist *sg, unsigned sg_len, unsigned dev_addr, |
729 | unsigned blocks, unsigned blksz, int write) | 727 | unsigned blocks, unsigned blksz, int write) |
730 | { | 728 | { |
731 | struct mmc_request mrq; | 729 | struct mmc_request mrq = {0}; |
732 | struct mmc_command cmd = {0}; | 730 | struct mmc_command cmd = {0}; |
733 | struct mmc_command stop = {0}; | 731 | struct mmc_command stop = {0}; |
734 | struct mmc_data data = {0}; | 732 | struct mmc_data data = {0}; |
735 | 733 | ||
736 | memset(&mrq, 0, sizeof(struct mmc_request)); | ||
737 | |||
738 | mrq.cmd = &cmd; | 734 | mrq.cmd = &cmd; |
739 | mrq.data = &data; | 735 | mrq.data = &data; |
740 | mrq.stop = &stop; | 736 | mrq.stop = &stop; |
@@ -755,15 +751,13 @@ static int mmc_test_simple_transfer(struct mmc_test_card *test, | |||
755 | static int mmc_test_broken_transfer(struct mmc_test_card *test, | 751 | static int mmc_test_broken_transfer(struct mmc_test_card *test, |
756 | unsigned blocks, unsigned blksz, int write) | 752 | unsigned blocks, unsigned blksz, int write) |
757 | { | 753 | { |
758 | struct mmc_request mrq; | 754 | struct mmc_request mrq = {0}; |
759 | struct mmc_command cmd = {0}; | 755 | struct mmc_command cmd = {0}; |
760 | struct mmc_command stop = {0}; | 756 | struct mmc_command stop = {0}; |
761 | struct mmc_data data = {0}; | 757 | struct mmc_data data = {0}; |
762 | 758 | ||
763 | struct scatterlist sg; | 759 | struct scatterlist sg; |
764 | 760 | ||
765 | memset(&mrq, 0, sizeof(struct mmc_request)); | ||
766 | |||
767 | mrq.cmd = &cmd; | 761 | mrq.cmd = &cmd; |
768 | mrq.data = &data; | 762 | mrq.data = &data; |
769 | mrq.stop = &stop; | 763 | mrq.stop = &stop; |