]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/mmc/host/omap_hsmmc.c
iio: frequency: ADF4350: Fix potential reference div factor overflow.
[karo-tx-linux.git] / drivers / mmc / host / omap_hsmmc.c
index 823d21cb87c01cf9673d90f682479fd234470cb3..3a09f93cc3b6f846a2b4cd327a7fd2a4524e31bc 100644 (file)
@@ -1100,7 +1100,7 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd)
        /* Disable the clocks */
        pm_runtime_put_sync(host->dev);
        if (host->dbclk)
-               clk_disable(host->dbclk);
+               clk_disable_unprepare(host->dbclk);
 
        /* Turn the power off */
        ret = mmc_slot(host).set_power(host->dev, host->slot_id, 0, 0);
@@ -1111,7 +1111,7 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd)
                                               vdd);
        pm_runtime_get_sync(host->dev);
        if (host->dbclk)
-               clk_enable(host->dbclk);
+               clk_prepare_enable(host->dbclk);
 
        if (ret != 0)
                goto err;
@@ -1875,7 +1875,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
        if (IS_ERR(host->dbclk)) {
                dev_warn(mmc_dev(host->mmc), "Failed to get debounce clk\n");
                host->dbclk = NULL;
-       } else if (clk_enable(host->dbclk) != 0) {
+       } else if (clk_prepare_enable(host->dbclk) != 0) {
                dev_warn(mmc_dev(host->mmc), "Failed to enable debounce clk\n");
                clk_put(host->dbclk);
                host->dbclk = NULL;
@@ -1907,6 +1907,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
        res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
        if (!res) {
                dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n");
+               ret = -ENXIO;
                goto err_irq;
        }
        tx_req = res->start;
@@ -1914,6 +1915,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
        res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
        if (!res) {
                dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n");
+               ret = -ENXIO;
                goto err_irq;
        }
        rx_req = res->start;
@@ -2020,7 +2022,7 @@ err_irq:
        pm_runtime_disable(host->dev);
        clk_put(host->fclk);
        if (host->dbclk) {
-               clk_disable(host->dbclk);
+               clk_disable_unprepare(host->dbclk);
                clk_put(host->dbclk);
        }
 err1:
@@ -2060,7 +2062,7 @@ static int __devexit omap_hsmmc_remove(struct platform_device *pdev)
        pm_runtime_disable(host->dev);
        clk_put(host->fclk);
        if (host->dbclk) {
-               clk_disable(host->dbclk);
+               clk_disable_unprepare(host->dbclk);
                clk_put(host->dbclk);
        }
 
@@ -2118,7 +2120,7 @@ static int omap_hsmmc_suspend(struct device *dev)
        }
 
        if (host->dbclk)
-               clk_disable(host->dbclk);
+               clk_disable_unprepare(host->dbclk);
 err:
        pm_runtime_put_sync(host->dev);
        return ret;
@@ -2139,7 +2141,7 @@ static int omap_hsmmc_resume(struct device *dev)
        pm_runtime_get_sync(host->dev);
 
        if (host->dbclk)
-               clk_enable(host->dbclk);
+               clk_prepare_enable(host->dbclk);
 
        if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER))
                omap_hsmmc_conf_bus_power(host);