Merge branches 'core-fixes-for-linus' and 'irq-fixes-for-linus' of git://git.kernel...
[pandora-kernel.git] / drivers / mmc / core / sd_ops.c
index 8023f58..021fed1 100644 (file)
@@ -21,7 +21,7 @@
 #include "core.h"
 #include "sd_ops.h"
 
-static int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card)
+int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card)
 {
        int err;
        struct mmc_command cmd = {0};
@@ -49,6 +49,7 @@ static int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card)
 
        return 0;
 }
+EXPORT_SYMBOL_GPL(mmc_app_cmd);
 
 /**
  *     mmc_wait_for_app_cmd - start an application command and wait for
@@ -66,7 +67,7 @@ static int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card)
 int mmc_wait_for_app_cmd(struct mmc_host *host, struct mmc_card *card,
        struct mmc_command *cmd, int retries)
 {
-       struct mmc_request mrq;
+       struct mmc_request mrq = {0};
 
        int i, err;
 
@@ -243,7 +244,7 @@ int mmc_send_relative_addr(struct mmc_host *host, unsigned int *rca)
 int mmc_app_send_scr(struct mmc_card *card, u32 *scr)
 {
        int err;
-       struct mmc_request mrq;
+       struct mmc_request mrq = {0};
        struct mmc_command cmd = {0};
        struct mmc_data data = {0};
        struct scatterlist sg;
@@ -266,8 +267,6 @@ int mmc_app_send_scr(struct mmc_card *card, u32 *scr)
        if (data_buf == NULL)
                return -ENOMEM;
 
-       memset(&mrq, 0, sizeof(struct mmc_request));
-
        mrq.cmd = &cmd;
        mrq.data = &data;
 
@@ -304,7 +303,7 @@ int mmc_app_send_scr(struct mmc_card *card, u32 *scr)
 int mmc_sd_switch(struct mmc_card *card, int mode, int group,
        u8 value, u8 *resp)
 {
-       struct mmc_request mrq;
+       struct mmc_request mrq = {0};
        struct mmc_command cmd = {0};
        struct mmc_data data = {0};
        struct scatterlist sg;
@@ -317,8 +316,6 @@ int mmc_sd_switch(struct mmc_card *card, int mode, int group,
        mode = !!mode;
        value &= 0xF;
 
-       memset(&mrq, 0, sizeof(struct mmc_request));
-
        mrq.cmd = &cmd;
        mrq.data = &data;
 
@@ -351,7 +348,7 @@ int mmc_sd_switch(struct mmc_card *card, int mode, int group,
 int mmc_app_sd_status(struct mmc_card *card, void *ssr)
 {
        int err;
-       struct mmc_request mrq;
+       struct mmc_request mrq = {0};
        struct mmc_command cmd = {0};
        struct mmc_data data = {0};
        struct scatterlist sg;
@@ -366,8 +363,6 @@ int mmc_app_sd_status(struct mmc_card *card, void *ssr)
        if (err)
                return err;
 
-       memset(&mrq, 0, sizeof(struct mmc_request));
-
        mrq.cmd = &cmd;
        mrq.data = &data;