aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sdio_ops.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/core/sdio_ops.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/core/sdio_ops.c')
-rw-r--r--drivers/mmc/core/sdio_ops.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/core/sdio_ops.c b/drivers/mmc/core/sdio_ops.c
index 147dfc1879b3..f087d876c573 100644
--- a/drivers/mmc/core/sdio_ops.c
+++ b/drivers/mmc/core/sdio_ops.c
@@ -121,7 +121,7 @@ int mmc_io_rw_direct(struct mmc_card *card, int write, unsigned fn,
121int mmc_io_rw_extended(struct mmc_card *card, int write, unsigned fn, 121int mmc_io_rw_extended(struct mmc_card *card, int write, unsigned fn,
122 unsigned addr, int incr_addr, u8 *buf, unsigned blocks, unsigned blksz) 122 unsigned addr, int incr_addr, u8 *buf, unsigned blocks, unsigned blksz)
123{ 123{
124 struct mmc_request mrq; 124 struct mmc_request mrq = {0};
125 struct mmc_command cmd = {0}; 125 struct mmc_command cmd = {0};
126 struct mmc_data data = {0}; 126 struct mmc_data data = {0};
127 struct scatterlist sg; 127 struct scatterlist sg;
@@ -136,8 +136,6 @@ int mmc_io_rw_extended(struct mmc_card *card, int write, unsigned fn,
136 if (addr & ~0x1FFFF) 136 if (addr & ~0x1FFFF)
137 return -EINVAL; 137 return -EINVAL;
138 138
139 memset(&mrq, 0, sizeof(struct mmc_request));
140
141 mrq.cmd = &cmd; 139 mrq.cmd = &cmd;
142 mrq.data = &data; 140 mrq.data = &data;
143 141