summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorChris Ball2011-04-14 05:49:45 +0200
committerChris Ball2011-05-25 03:02:01 +0200
commit24f5b53ba076e983bc64fa48534ca795d7813d51 (patch)
tree6ae546b6443ec6f28694a9688fdd79da633c57b7 /drivers/mmc/core/core.c
parentmmc: initialize struct mmc_data at declaration time (diff)
downloadkernel-qcow2-linux-24f5b53ba076e983bc64fa48534ca795d7813d51.tar.gz
kernel-qcow2-linux-24f5b53ba076e983bc64fa48534ca795d7813d51.tar.xz
kernel-qcow2-linux-24f5b53ba076e983bc64fa48534ca795d7813d51.zip
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/core/core.c')
-rw-r--r--drivers/mmc/core/core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index f273ffd6557a..1dbc18576219 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -236,12 +236,10 @@ EXPORT_SYMBOL(mmc_wait_for_req);
*/
int mmc_wait_for_cmd(struct mmc_host *host, struct mmc_command *cmd, int retries)
{
- struct mmc_request mrq;
+ struct mmc_request mrq = {0};
WARN_ON(!host->claimed);
- memset(&mrq, 0, sizeof(struct mmc_request));
-
memset(cmd->resp, 0, sizeof(cmd->resp));
cmd->retries = retries;