diff options
Diffstat (limited to 'drivers/rtc/rtc-coh901331.c')
| -rw-r--r-- | drivers/rtc/rtc-coh901331.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c index c8115b83e5ab..2d28ec1aa1cd 100644 --- a/drivers/rtc/rtc-coh901331.c +++ b/drivers/rtc/rtc-coh901331.c | |||
| @@ -157,7 +157,6 @@ static int __exit coh901331_remove(struct platform_device *pdev) | |||
| 157 | if (rtap) { | 157 | if (rtap) { |
| 158 | rtc_device_unregister(rtap->rtc); | 158 | rtc_device_unregister(rtap->rtc); |
| 159 | clk_unprepare(rtap->clk); | 159 | clk_unprepare(rtap->clk); |
| 160 | clk_put(rtap->clk); | ||
| 161 | platform_set_drvdata(pdev, NULL); | 160 | platform_set_drvdata(pdev, NULL); |
| 162 | } | 161 | } |
| 163 | 162 | ||
| @@ -196,7 +195,7 @@ static int __init coh901331_probe(struct platform_device *pdev) | |||
| 196 | "RTC COH 901 331 Alarm", rtap)) | 195 | "RTC COH 901 331 Alarm", rtap)) |
| 197 | return -EIO; | 196 | return -EIO; |
| 198 | 197 | ||
| 199 | rtap->clk = clk_get(&pdev->dev, NULL); | 198 | rtap->clk = devm_clk_get(&pdev->dev, NULL); |
| 200 | if (IS_ERR(rtap->clk)) { | 199 | if (IS_ERR(rtap->clk)) { |
| 201 | ret = PTR_ERR(rtap->clk); | 200 | ret = PTR_ERR(rtap->clk); |
| 202 | dev_err(&pdev->dev, "could not get clock\n"); | 201 | dev_err(&pdev->dev, "could not get clock\n"); |
| @@ -207,7 +206,7 @@ static int __init coh901331_probe(struct platform_device *pdev) | |||
| 207 | ret = clk_prepare_enable(rtap->clk); | 206 | ret = clk_prepare_enable(rtap->clk); |
| 208 | if (ret) { | 207 | if (ret) { |
| 209 | dev_err(&pdev->dev, "could not enable clock\n"); | 208 | dev_err(&pdev->dev, "could not enable clock\n"); |
| 210 | goto out_no_clk_prepenable; | 209 | return ret; |
| 211 | } | 210 | } |
| 212 | clk_disable(rtap->clk); | 211 | clk_disable(rtap->clk); |
| 213 | 212 | ||
| @@ -224,8 +223,6 @@ static int __init coh901331_probe(struct platform_device *pdev) | |||
| 224 | out_no_rtc: | 223 | out_no_rtc: |
| 225 | platform_set_drvdata(pdev, NULL); | 224 | platform_set_drvdata(pdev, NULL); |
| 226 | clk_unprepare(rtap->clk); | 225 | clk_unprepare(rtap->clk); |
| 227 | out_no_clk_prepenable: | ||
| 228 | clk_put(rtap->clk); | ||
| 229 | return ret; | 226 | return ret; |
| 230 | } | 227 | } |
| 231 | 228 | ||
