From patchwork Mon Jan 7 16:47:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 13894 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 78D1123E2D for ; Mon, 7 Jan 2013 16:47:59 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id B41B1A1966F for ; Mon, 7 Jan 2013 16:47:58 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fc26so20035899vbb.3 for ; Mon, 07 Jan 2013 08:47:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=P1Oa6Z0XGQoOsuFzBqzRz6Ew/n4rulX4kdTPnjLa5RQ=; b=gVJSmpzVTfWDZgyLN+vkkphuQ7YT618xAs6GvYPG5nEPhVaPw+OWPfvBvLdv9MnMM2 eDRYxOFXaxkmWn+X3OzWu4aYM0dP0MaEmPXeffRuKIySX6u9q244cX2pjKeGshS9SKyj LmcvhyxDdylfW8KI+6pH0E5ieG/tYnNXRM8mbORLLDg1VSvKkOtFVgAmHVlJiw23QIe/ 4MIHsbq3mA9NNt7llUKJdxzigVvagt2zcSqrp1zfZENPibG5BA0rFqQntMOS+ogd1qmY UX7PWJ+7CMmpkG3mT/odYbYGkUjBdUk59klbW3gcp6+8dSAISu/js9++H2E7lBE/Sirl gVcw== X-Received: by 10.52.176.6 with SMTP id ce6mr72891615vdc.57.1357577278189; Mon, 07 Jan 2013 08:47:58 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp69839veb; Mon, 7 Jan 2013 08:47:57 -0800 (PST) X-Received: by 10.14.221.9 with SMTP id q9mr167677961eep.3.1357577276800; Mon, 07 Jan 2013 08:47:56 -0800 (PST) Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com [74.125.83.51]) by mx.google.com with ESMTPS id r6si91566307eem.114.2013.01.07.08.47.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Jan 2013 08:47:56 -0800 (PST) Received-SPF: neutral (google.com: 74.125.83.51 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=74.125.83.51; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.83.51 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) smtp.mail=fabio.baltieri@linaro.org Received: by mail-ee0-f51.google.com with SMTP id d4so9102540eek.38 for ; Mon, 07 Jan 2013 08:47:56 -0800 (PST) X-Received: by 10.14.214.132 with SMTP id c4mr166132644eep.18.1357577275953; Mon, 07 Jan 2013 08:47:55 -0800 (PST) Received: from localhost ([2a01:2029:1:11e3:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id r1sm130049592eeo.2.2013.01.07.08.47.50 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Jan 2013 08:47:55 -0800 (PST) From: Fabio Baltieri To: Felipe Balbi , Linus Walleij Cc: Ulf Hansson , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Fabio Baltieri Subject: [PATCH] usb: musb: ux500: use clk_prepare_enable and clk_disable_unprepare Date: Mon, 7 Jan 2013 17:47:41 +0100 Message-Id: <1357577261-31536-1-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.7.12.1 X-Gm-Message-State: ALoCoQltcWxmUuulRtq70vGfxHmNcA2xDo0VnBNMcKztk2WTpYe3bl4YYtVQvR4JpIWGEIDCXlkT This patch converts the module to use clk_prepare_enable and clk_disable_unprepare variants as required by common clock framework. Without this the system crash during probe function. Signed-off-by: Fabio Baltieri --- drivers/usb/musb/ux500.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c index a27ca1a..0804661 100644 --- a/drivers/usb/musb/ux500.c +++ b/drivers/usb/musb/ux500.c @@ -108,7 +108,7 @@ static int ux500_probe(struct platform_device *pdev) goto err3; } - ret = clk_enable(clk); + ret = clk_prepare_enable(clk); if (ret) { dev_err(&pdev->dev, "failed to enable clock\n"); goto err4; @@ -148,7 +148,7 @@ static int ux500_probe(struct platform_device *pdev) return 0; err5: - clk_disable(clk); + clk_disable_unprepare(clk); err4: clk_put(clk); @@ -168,7 +168,7 @@ static int ux500_remove(struct platform_device *pdev) struct ux500_glue *glue = platform_get_drvdata(pdev); platform_device_unregister(glue->musb); - clk_disable(glue->clk); + clk_disable_unprepare(glue->clk); clk_put(glue->clk); kfree(glue); @@ -182,7 +182,7 @@ static int ux500_suspend(struct device *dev) struct musb *musb = glue_to_musb(glue); usb_phy_set_suspend(musb->xceiv, 1); - clk_disable(glue->clk); + clk_disable_unprepare(glue->clk); return 0; } @@ -193,7 +193,7 @@ static int ux500_resume(struct device *dev) struct musb *musb = glue_to_musb(glue); int ret; - ret = clk_enable(glue->clk); + ret = clk_prepare_enable(glue->clk); if (ret) { dev_err(dev, "failed to enable clock\n"); return ret;