These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / ata / pata_arasan_cf.c
index a9b0c82..80fe0f6 100644 (file)
@@ -4,7 +4,7 @@
  * Arasan Compact Flash host controller source file
  *
  * Copyright (C) 2011 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
  *
  * This file is licensed under the terms of the GNU General Public
  * License version 2. This program is licensed "as is" without any
@@ -834,7 +834,7 @@ static int arasan_cf_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
-       acdev->clk = clk_get(&pdev->dev, NULL);
+       acdev->clk = devm_clk_get(&pdev->dev, NULL);
        if (IS_ERR(acdev->clk)) {
                dev_warn(&pdev->dev, "Clock not found\n");
                return PTR_ERR(acdev->clk);
@@ -843,9 +843,8 @@ static int arasan_cf_probe(struct platform_device *pdev)
        /* allocate host */
        host = ata_host_alloc(&pdev->dev, 1);
        if (!host) {
-               ret = -ENOMEM;
                dev_warn(&pdev->dev, "alloc host fail\n");
-               goto free_clk;
+               return -ENOMEM;
        }
 
        ap = host->ports[0];
@@ -894,7 +893,7 @@ static int arasan_cf_probe(struct platform_device *pdev)
 
        ret = cf_init(acdev);
        if (ret)
-               goto free_clk;
+               return ret;
 
        cf_card_detect(acdev, 0);
 
@@ -904,8 +903,7 @@ static int arasan_cf_probe(struct platform_device *pdev)
                return 0;
 
        cf_exit(acdev);
-free_clk:
-       clk_put(acdev->clk);
+
        return ret;
 }
 
@@ -916,7 +914,6 @@ static int arasan_cf_remove(struct platform_device *pdev)
 
        ata_host_detach(host);
        cf_exit(acdev);
-       clk_put(acdev->clk);
 
        return 0;
 }
@@ -968,7 +965,7 @@ static struct platform_driver arasan_cf_driver = {
 
 module_platform_driver(arasan_cf_driver);
 
-MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>");
+MODULE_AUTHOR("Viresh Kumar <vireshk@kernel.org>");
 MODULE_DESCRIPTION("Arasan ATA Compact Flash driver");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:" DRIVER_NAME);