aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card/block.c
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2011-04-13 23:46:05 -0400
committerChris Ball <cjb@laptop.org>2011-05-24 21:01:56 -0400
commita61ad2b49bfce94dfddce828cd9222e4b9e7825b (patch)
tree36f93e61adc7c7d7523c78c78c3df1e75fae5e33 /drivers/mmc/card/block.c
parent1278dba167f01bb3c6626d16450d31129d041087 (diff)
mmc: initialize struct mmc_data at declaration time
Converts from: struct mmc_data data; memset(&data, 0, sizeof(struct mmc_data)); to: struct mmc_data data = {0}; because it's shorter, as performant, and easier to work out whether initialization has happened. Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r--drivers/mmc/card/block.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 93a7efcbfde9..fb387c803205 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -261,7 +261,7 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card)
261 261
262 struct mmc_request mrq; 262 struct mmc_request mrq;
263 struct mmc_command cmd = {0}; 263 struct mmc_command cmd = {0};
264 struct mmc_data data; 264 struct mmc_data data = {0};
265 unsigned int timeout_us; 265 unsigned int timeout_us;
266 266
267 struct scatterlist sg; 267 struct scatterlist sg;
@@ -282,8 +282,6 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card)
282 cmd.arg = 0; 282 cmd.arg = 0;
283 cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC; 283 cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
284 284
285 memset(&data, 0, sizeof(struct mmc_data));
286
287 data.timeout_ns = card->csd.tacc_ns * 100; 285 data.timeout_ns = card->csd.tacc_ns * 100;
288 data.timeout_clks = card->csd.tacc_clks * 100; 286 data.timeout_clks = card->csd.tacc_clks * 100;
289 287