From patchwork Mon Sep 3 10:45:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 11148 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 A519423EFF for ; Mon, 3 Sep 2012 10:48:00 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 6587CA18029 for ; Mon, 3 Sep 2012 10:47:13 +0000 (UTC) Received: by iafj25 with SMTP id j25so7163388iaf.11 for ; Mon, 03 Sep 2012 03:47:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=LXF1R8oMK04CwTCVWHg53GXlkn5tMNIdjAc1Dghhmus=; b=ayrOhHppuJ77ALN4S17RIW1DBfQlbV8VCM1/TCN9U7uJgoCx8U3msT/X9v5iPQaLs6 hIGEyAhOAp9CLubNquVvc14I3drMYIGgyrzI3SQQ2pm63tKPF/xxSfknxMU8NUmaeOgZ anE6ItkUbQtTdmPrIllBdKqmfXF5x7LiTl46FoUkqfafxRB/Ylgy4nTlqdyqJrldid+i EtDXOwQUr/RFLt1KQNcHK2qSU1Q+IAUC76nJk9vfW87rurYezO4sfg2q+ENJY/irMEQc mhiR6SD1KMXTciCDQgJxVtc6RphmzGJHJ4MVTRytJTFbQEddo3OEOQN4itbrLF+1TMes RUhA== Received: by 10.50.207.106 with SMTP id lv10mr10381589igc.0.1346669279780; Mon, 03 Sep 2012 03:47:59 -0700 (PDT) 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.50.184.232 with SMTP id ex8csp130304igc; Mon, 3 Sep 2012 03:47:59 -0700 (PDT) Received: by 10.66.85.166 with SMTP id i6mr31946933paz.45.1346669278348; Mon, 03 Sep 2012 03:47:58 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id pb4si21861371pbc.270.2012.09.03.03.47.57 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Sep 2012 03:47:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by dade7 with SMTP id e7so3958388dad.37 for ; Mon, 03 Sep 2012 03:47:57 -0700 (PDT) Received: by 10.68.189.70 with SMTP id gg6mr37508725pbc.125.1346669277767; Mon, 03 Sep 2012 03:47:57 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id gf7sm9672061pbc.65.2012.09.03.03.47.54 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Sep 2012 03:47:56 -0700 (PDT) From: Sachin Kamat To: linux-usb@vger.kernel.org Cc: balbi@ti.com, gregkh@linuxfoundation.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH] usb: gadget: s3c-hsotg: Use devm_clk_get function Date: Mon, 3 Sep 2012 16:15:18 +0530 Message-Id: <1346669118-18432-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQldOwhbrbgfURrcpZnLNPq9pjbY4ra1vipb6I71qVPqNXONmzvIxWU1/MKCZrTElzd8KnZg devm_* functions are already used in this file. Hence convert clk_get to devm_clk_get for completeness. Signed-off-by: Sachin Kamat --- drivers/usb/gadget/s3c-hsotg.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 0bb617e..1c8789a 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -3516,7 +3516,7 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev) hsotg->dev = dev; hsotg->plat = plat; - hsotg->clk = clk_get(&pdev->dev, "otg"); + hsotg->clk = devm_clk_get(&pdev->dev, "otg"); if (IS_ERR(hsotg->clk)) { dev_err(dev, "cannot get otg clock\n"); return PTR_ERR(hsotg->clk); @@ -3667,7 +3667,6 @@ err_supplies: err_clk: clk_disable_unprepare(hsotg->clk); - clk_put(hsotg->clk); return ret; } @@ -3693,7 +3692,6 @@ static int __devexit s3c_hsotg_remove(struct platform_device *pdev) regulator_bulk_free(ARRAY_SIZE(hsotg->supplies), hsotg->supplies); clk_disable_unprepare(hsotg->clk); - clk_put(hsotg->clk); device_unregister(&hsotg->gadget.dev); return 0;