diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-01-09 21:05:06 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2013-01-14 13:31:19 -0500 |
commit | 25effc3647635b8775aefcfd884a359b9fa31e9d (patch) | |
tree | e8218cf743fb8763fcf9a476f88464f62b1de7dd /drivers/ata/pata_samsung_cf.c | |
parent | 803739d25c2343da6d2f95eebdcbc08bf67097d4 (diff) |
pata_samsung_cf: Use devm_clk_get()
Use devm_clk_get() rather than clk_get() to make cleanup paths
more simple.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_samsung_cf.c')
-rw-r--r-- | drivers/ata/pata_samsung_cf.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c index 63ffb002ec67..70b0e01372b3 100644 --- a/drivers/ata/pata_samsung_cf.c +++ b/drivers/ata/pata_samsung_cf.c | |||
@@ -512,7 +512,7 @@ static int __init pata_s3c_probe(struct platform_device *pdev) | |||
512 | return -ENOMEM; | 512 | return -ENOMEM; |
513 | } | 513 | } |
514 | 514 | ||
515 | info->clk = clk_get(&pdev->dev, "cfcon"); | 515 | info->clk = devm_clk_get(&pdev->dev, "cfcon"); |
516 | if (IS_ERR(info->clk)) { | 516 | if (IS_ERR(info->clk)) { |
517 | dev_err(dev, "failed to get access to cf controller clock\n"); | 517 | dev_err(dev, "failed to get access to cf controller clock\n"); |
518 | ret = PTR_ERR(info->clk); | 518 | ret = PTR_ERR(info->clk); |
@@ -589,7 +589,6 @@ static int __init pata_s3c_probe(struct platform_device *pdev) | |||
589 | 589 | ||
590 | stop_clk: | 590 | stop_clk: |
591 | clk_disable(info->clk); | 591 | clk_disable(info->clk); |
592 | clk_put(info->clk); | ||
593 | return ret; | 592 | return ret; |
594 | } | 593 | } |
595 | 594 | ||
@@ -601,7 +600,6 @@ static int __exit pata_s3c_remove(struct platform_device *pdev) | |||
601 | ata_host_detach(host); | 600 | ata_host_detach(host); |
602 | 601 | ||
603 | clk_disable(info->clk); | 602 | clk_disable(info->clk); |
604 | clk_put(info->clk); | ||
605 | 603 | ||
606 | return 0; | 604 | return 0; |
607 | } | 605 | } |