aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card/block.c
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2011-04-13 23:49:45 -0400
committerChris Ball <cjb@laptop.org>2011-05-24 21:02:01 -0400
commit24f5b53ba076e983bc64fa48534ca795d7813d51 (patch)
tree6ae546b6443ec6f28694a9688fdd79da633c57b7 /drivers/mmc/card/block.c
parenta61ad2b49bfce94dfddce828cd9222e4b9e7825b (diff)
mmc: initialize struct mmc_request at declaration time
Converts from: struct mmc_request mrq; memset(&mrq, 0, sizeof(struct mmc_request)); to: struct mmc_request mrq = {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 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