From patchwork Mon Jan 7 04:31:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13854 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 16C0923E1F for ; Mon, 7 Jan 2013 04:40:04 +0000 (UTC) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by fiordland.canonical.com (Postfix) with ESMTP id C4DC3A1988E for ; Mon, 7 Jan 2013 04:40:03 +0000 (UTC) Received: by mail-vc0-f171.google.com with SMTP id n11so18791418vch.2 for ; Sun, 06 Jan 2013 20:40:03 -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=m+u2h/pW9V4PmvpjbszwJwp986szje6PoC97G/lO1ak=; b=YcOo6XSN4a0pc48hLppPEp+RM5OfPsA9cRx10RD6nA2pv9Jn75+Bp1z30RmogdkUI3 1Ohk4lMH16nFcgnL+gO6J3JZkFoMwqB1OLuMJFpEw+KU5oY06ZIE34onYFiyxxH0jXZU JGLUlY+oGEBhkUcBebK1C2qt/ggh4dueSEjzJFvKKQ/qJMWVHd1HmAcOoaSAjenotPAy 1BVfoDOin5uF9GhWdqmuffP6wZF1vE7XAtI1fvAOoIdAKtSsJbRd0akYiCMuRy2WvoeG f3RbV5uwIRAEb9CHMlFR3wdsbuQMGozzGi2BeskVWMIjhquLAU6aAAGW2x6L5D5Ba2Tu gMMA== X-Received: by 10.52.18.147 with SMTP id w19mr71774357vdd.94.1357533603277; Sun, 06 Jan 2013 20:40:03 -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 st5csp45693veb; Sun, 6 Jan 2013 20:40:02 -0800 (PST) X-Received: by 10.68.243.33 with SMTP id wv1mr178583017pbc.143.1357533602248; Sun, 06 Jan 2013 20:40:02 -0800 (PST) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by mx.google.com with ESMTPS id zn8si57922807pbc.202.2013.01.06.20.40.01 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Jan 2013 20:40:02 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.51 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.51; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.51 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f51.google.com with SMTP id fb11so10425975pad.24 for ; Sun, 06 Jan 2013 20:40:01 -0800 (PST) X-Received: by 10.66.83.196 with SMTP id s4mr174409702pay.74.1357533601720; Sun, 06 Jan 2013 20:40:01 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id l5sm37963817paz.14.2013.01.06.20.39.58 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Jan 2013 20:40:01 -0800 (PST) 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 1/1] usb: gadget: s3c-hsudc: Use devm_regulator_bulk_get Date: Mon, 7 Jan 2013 10:01:53 +0530 Message-Id: <1357533113-7280-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQkfujENr3v3hjCRyeRmZixGBTvJn+PBtfrzztHHGX2o9pIMvtqe8izY4Vn4D70V7MaeL8JJ devm_regulator_bulk_get is device managed and makes exit code simpler. Signed-off-by: Sachin Kamat --- drivers/usb/gadget/s3c-hsudc.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index 52379b1..d2b8791 100644 --- a/drivers/usb/gadget/s3c-hsudc.c +++ b/drivers/usb/gadget/s3c-hsudc.c @@ -1286,7 +1286,7 @@ static int s3c_hsudc_probe(struct platform_device *pdev) for (i = 0; i < ARRAY_SIZE(hsudc->supplies); i++) hsudc->supplies[i].supply = s3c_hsudc_supply_names[i]; - ret = regulator_bulk_get(dev, ARRAY_SIZE(hsudc->supplies), + ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(hsudc->supplies), hsudc->supplies); if (ret != 0) { dev_err(dev, "failed to request supplies: %d\n", ret); @@ -1367,7 +1367,6 @@ err_res: if (!IS_ERR_OR_NULL(hsudc->transceiver)) usb_put_phy(hsudc->transceiver); - regulator_bulk_free(ARRAY_SIZE(hsudc->supplies), hsudc->supplies); err_supplies: return ret; }