diff options
Diffstat (limited to 'drivers/rtc/rtc-s3c.c')
-rw-r--r-- | drivers/rtc/rtc-s3c.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index a6b1252c9941..806072238c00 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c | |||
@@ -535,13 +535,15 @@ static int s3c_rtc_probe(struct platform_device *pdev) | |||
535 | } | 535 | } |
536 | clk_prepare_enable(info->rtc_clk); | 536 | clk_prepare_enable(info->rtc_clk); |
537 | 537 | ||
538 | info->rtc_src_clk = devm_clk_get(&pdev->dev, "rtc_src"); | 538 | if (info->data->needs_src_clk) { |
539 | if (IS_ERR(info->rtc_src_clk)) { | 539 | info->rtc_src_clk = devm_clk_get(&pdev->dev, "rtc_src"); |
540 | dev_err(&pdev->dev, "failed to find rtc source clock\n"); | 540 | if (IS_ERR(info->rtc_src_clk)) { |
541 | return PTR_ERR(info->rtc_src_clk); | 541 | dev_err(&pdev->dev, |
542 | "failed to find rtc source clock\n"); | ||
543 | return PTR_ERR(info->rtc_src_clk); | ||
544 | } | ||
545 | clk_prepare_enable(info->rtc_src_clk); | ||
542 | } | 546 | } |
543 | clk_prepare_enable(info->rtc_src_clk); | ||
544 | |||
545 | 547 | ||
546 | /* check to see if everything is setup correctly */ | 548 | /* check to see if everything is setup correctly */ |
547 | if (info->data->enable) | 549 | if (info->data->enable) |