From patchwork Mon Jun 30 19:08:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 4453821 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 37A809F358 for ; Mon, 30 Jun 2014 19:10:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1DD7E2037D for ; Mon, 30 Jun 2014 19:10:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47D8820379 for ; Mon, 30 Jun 2014 19:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754379AbaF3TKi (ORCPT ); Mon, 30 Jun 2014 15:10:38 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:41002 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753797AbaF3TKi (ORCPT ); Mon, 30 Jun 2014 15:10:38 -0400 Received: by mail-wg0-f47.google.com with SMTP id k14so8699821wgh.30 for ; Mon, 30 Jun 2014 12:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=GpjH1SiTbLMI1sdRbc+ZqCeo7E7HzQQZ+EMX+ZDTgCY=; b=CteaAuau6V5tIovHZeN9t0ZzaSZwpEHR62Jy2XqmnGNJw82BEYKZk5UwqKRKHbgieq OM56dnb2GoyQSbiKKD2LO2XG8Eyslq2MOZF0xCk/xh3/VIPB4KalSSr/ii/vbH0ntM85 7eyouncW+aRlA92E8wdB1NDYCsTkVPaJxy9k1FD7epXH67BsO/WTT6QaP8RUvgyK/gFW AjRsEluf6Q38yAYY7CM+DjvP5y7eq92oWMImRVnETUW5EF8fpRKEkub3pXO48sXOmRPi 7fh7jKYGGA/ceFsO2V3vfZJa3BWzk1PtD+3jW2s4SPqJnaOXXQST6Kx2XayijUhLcBVD TSIA== X-Received: by 10.194.58.199 with SMTP id t7mr47670148wjq.14.1404155436759; Mon, 30 Jun 2014 12:10:36 -0700 (PDT) Received: from anarsoul-thinkpad.localdomain ([212.98.170.222]) by mx.google.com with ESMTPSA id nf11sm579346wic.9.2014.06.30.12.10.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jun 2014 12:10:36 -0700 (PDT) From: Vasily Khoruzhick To: Kukjin Kim , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Ben Dooks Cc: Vasily Khoruzhick Subject: [PATCH] ARM: Samsung: ADC: Move to clk_prepare_enable/clk_disable_unprepare Date: Mon, 30 Jun 2014 22:08:08 +0300 Message-Id: <1404155288-2787-1-git-send-email-anarsoul@gmail.com> X-Mailer: git-send-email 2.0.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use clk_prepare_enable/clk_disable_unprepare to make the driver work properly with common clock framework. Signed-off-by: Vasily Khoruzhick Reviewed-by: Tomasz Figa --- arch/arm/plat-samsung/adc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index 79690f2..c5831b49 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c @@ -389,7 +389,7 @@ static int s3c_adc_probe(struct platform_device *pdev) if (ret) return ret; - clk_enable(adc->clk); + clk_prepare_enable(adc->clk); tmp = adc->prescale | S3C2410_ADCCON_PRSCEN; @@ -413,7 +413,7 @@ static int s3c_adc_remove(struct platform_device *pdev) { struct adc_device *adc = platform_get_drvdata(pdev); - clk_disable(adc->clk); + clk_disable_unprepare(adc->clk); regulator_disable(adc->vdd); return 0; @@ -436,7 +436,7 @@ static int s3c_adc_suspend(struct device *dev) disable_irq(adc->irq); spin_unlock_irqrestore(&adc->lock, flags); - clk_disable(adc->clk); + clk_disable_unprepare(adc->clk); regulator_disable(adc->vdd); return 0; @@ -454,7 +454,7 @@ static int s3c_adc_resume(struct device *dev) ret = regulator_enable(adc->vdd); if (ret) return ret; - clk_enable(adc->clk); + clk_prepare_enable(adc->clk); enable_irq(adc->irq); tmp = adc->prescale | S3C2410_ADCCON_PRSCEN;