summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/sdio_ops.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/core/sdio_ops.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/core/sdio_ops.c')
-rw-r--r--drivers/mmc/core/sdio_ops.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/core/sdio_ops.c b/drivers/mmc/core/sdio_ops.c
index f77b1bc318ed..147dfc1879b3 100644
--- a/drivers/mmc/core/sdio_ops.c
+++ b/drivers/mmc/core/sdio_ops.c
@@ -123,7 +123,7 @@ int mmc_io_rw_extended(struct mmc_card *card, int write, unsigned fn,
{
struct mmc_request mrq;
struct mmc_command cmd = {0};
- struct mmc_data data;
+ struct mmc_data data = {0};
struct scatterlist sg;
BUG_ON(!card);
@@ -137,7 +137,6 @@ int mmc_io_rw_extended(struct mmc_card *card, int write, unsigned fn,
return -EINVAL;
memset(&mrq, 0, sizeof(struct mmc_request));
- memset(&data, 0, sizeof(struct mmc_data));
mrq.cmd = &cmd;
mrq.data = &data;