ata: use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable in host drivers
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / ata / pata_imx.c
index 26386f0..76b6f48 100644 (file)
@@ -119,7 +119,9 @@ static int pata_imx_probe(struct platform_device *pdev)
                return PTR_ERR(priv->clk);
        }
 
-       clk_prepare_enable(priv->clk);
+       ret = clk_prepare_enable(priv->clk);
+       if (ret)
+               return ret;
 
        host = ata_host_alloc(&pdev->dev, 1);
        if (!host) {
@@ -189,7 +191,7 @@ static int pata_imx_remove(struct platform_device *pdev)
        return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int pata_imx_suspend(struct device *dev)
 {
        struct ata_host *host = dev_get_drvdata(dev);
@@ -212,7 +214,9 @@ static int pata_imx_resume(struct device *dev)
        struct ata_host *host = dev_get_drvdata(dev);
        struct pata_imx_priv *priv = host->private_data;
 
-       clk_prepare_enable(priv->clk);
+       int ret = clk_prepare_enable(priv->clk);
+       if (ret)
+               return ret;
 
        __raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL);
 
@@ -246,7 +250,7 @@ static struct platform_driver pata_imx_driver = {
                .name           = DRV_NAME,
                .of_match_table = imx_pata_dt_ids,
                .owner          = THIS_MODULE,
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
                .pm             = &pata_imx_pm_ops,
 #endif
        },