mmc: sdhci: Make set_ios_post() return int
authorFaiz Abbas <faiz_abbas@ti.com>
Mon, 10 Jun 2019 19:13:37 +0000 (00:43 +0530)
committerTom Rini <trini@konsulko.com>
Wed, 17 Jul 2019 15:12:08 +0000 (11:12 -0400)
Make set_ios_post() return int to faciliate error handling in
platform drivers.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
drivers/mmc/sdhci.c
drivers/mmc/xenon_sdhci.c
include/sdhci.h

index 151e1e3c660835d4ba96183e8132695f6f5bfa17..61cf216e127b2b3460e311496e69a4601654455a 100644 (file)
@@ -584,7 +584,7 @@ static int sdhci_set_ios(struct mmc *mmc)
 
        /* If available, call the driver specific "post" set_ios() function */
        if (host->ops && host->ops->set_ios_post)
-               host->ops->set_ios_post(host);
+               return host->ops->set_ios_post(host);
 
        return 0;
 }
index b576511338089c5be5f1336cc89c06e108c710a1..829b75683b2c80c680aab56a12162949b38c8585 100644 (file)
@@ -326,7 +326,7 @@ static void xenon_mask_cmd_conflict_err(struct sdhci_host *host)
 }
 
 /* Platform specific function for post set_ios configuration */
-static void xenon_sdhci_set_ios_post(struct sdhci_host *host)
+static int xenon_sdhci_set_ios_post(struct sdhci_host *host)
 {
        struct xenon_sdhci_priv *priv = host->mmc->priv;
        uint speed = host->mmc->tran_speed;
@@ -364,6 +364,8 @@ static void xenon_sdhci_set_ios_post(struct sdhci_host *host)
 
        /* Re-init the PHY */
        xenon_mmc_phy_set(host);
+
+       return 0;
 }
 
 /* Install a driver specific handler for post set_ios configuration */
index 820cd16e92c9c443c7211ab701d1f1bfb8e2ded0..3dcbc1496595325fd849572e0aaf4939c8571378 100644 (file)
@@ -247,7 +247,7 @@ struct sdhci_ops {
 #endif
        int     (*get_cd)(struct sdhci_host *host);
        void    (*set_control_reg)(struct sdhci_host *host);
-       void    (*set_ios_post)(struct sdhci_host *host);
+       int     (*set_ios_post)(struct sdhci_host *host);
        void    (*set_clock)(struct sdhci_host *host, u32 div);
        int (*platform_execute_tuning)(struct mmc *host, u8 opcode);
        void (*set_delay)(struct sdhci_host *host);