Commit bae3dee0 authored by Jisheng Zhang's avatar Jisheng Zhang Committed by Ulf Hansson

mmc: sdhci-xenon: kill xenon_clean_phy()

Currently, the xenon_clean_phy() is only used for freeing phy_params.
The phy_params is allocated by devm_kzalloc(), there's no need to free
is explicitly.
Signed-off-by: default avatarJisheng Zhang <jszhang@marvell.com>
Acked-by: default avatarHu Ziji <huziji@marvell.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
parent 2ea659a9
...@@ -787,14 +787,6 @@ int xenon_phy_adj(struct sdhci_host *host, struct mmc_ios *ios) ...@@ -787,14 +787,6 @@ int xenon_phy_adj(struct sdhci_host *host, struct mmc_ios *ios)
return ret; return ret;
} }
void xenon_clean_phy(struct sdhci_host *host)
{
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
struct xenon_priv *priv = sdhci_pltfm_priv(pltfm_host);
kfree(priv->phy_params);
}
static int xenon_add_phy(struct device_node *np, struct sdhci_host *host, static int xenon_add_phy(struct device_node *np, struct sdhci_host *host,
const char *phy_name) const char *phy_name)
{ {
...@@ -819,11 +811,7 @@ static int xenon_add_phy(struct device_node *np, struct sdhci_host *host, ...@@ -819,11 +811,7 @@ static int xenon_add_phy(struct device_node *np, struct sdhci_host *host,
if (ret) if (ret)
return ret; return ret;
ret = xenon_emmc_phy_parse_param_dt(host, np, priv->phy_params); return xenon_emmc_phy_parse_param_dt(host, np, priv->phy_params);
if (ret)
xenon_clean_phy(host);
return ret;
} }
int xenon_phy_parse_dt(struct device_node *np, struct sdhci_host *host) int xenon_phy_parse_dt(struct device_node *np, struct sdhci_host *host)
......
...@@ -486,7 +486,7 @@ static int xenon_probe(struct platform_device *pdev) ...@@ -486,7 +486,7 @@ static int xenon_probe(struct platform_device *pdev)
err = xenon_sdhc_prepare(host); err = xenon_sdhc_prepare(host);
if (err) if (err)
goto clean_phy_param; goto err_clk;
err = sdhci_add_host(host); err = sdhci_add_host(host);
if (err) if (err)
...@@ -496,8 +496,6 @@ static int xenon_probe(struct platform_device *pdev) ...@@ -496,8 +496,6 @@ static int xenon_probe(struct platform_device *pdev)
remove_sdhc: remove_sdhc:
xenon_sdhc_unprepare(host); xenon_sdhc_unprepare(host);
clean_phy_param:
xenon_clean_phy(host);
err_clk: err_clk:
clk_disable_unprepare(pltfm_host->clk); clk_disable_unprepare(pltfm_host->clk);
free_pltfm: free_pltfm:
...@@ -510,8 +508,6 @@ static int xenon_remove(struct platform_device *pdev) ...@@ -510,8 +508,6 @@ static int xenon_remove(struct platform_device *pdev)
struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_host *host = platform_get_drvdata(pdev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
xenon_clean_phy(host);
sdhci_remove_host(host, 0); sdhci_remove_host(host, 0);
xenon_sdhc_unprepare(host); xenon_sdhc_unprepare(host);
......
...@@ -93,7 +93,6 @@ struct xenon_priv { ...@@ -93,7 +93,6 @@ struct xenon_priv {
}; };
int xenon_phy_adj(struct sdhci_host *host, struct mmc_ios *ios); int xenon_phy_adj(struct sdhci_host *host, struct mmc_ios *ios);
void xenon_clean_phy(struct sdhci_host *host);
int xenon_phy_parse_dt(struct device_node *np, int xenon_phy_parse_dt(struct device_node *np,
struct sdhci_host *host); struct sdhci_host *host);
void xenon_soc_pad_ctrl(struct sdhci_host *host, void xenon_soc_pad_ctrl(struct sdhci_host *host,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment