From patchwork Tue Jan 8 06:58:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 1944341 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 7EF4C3FED4 for ; Tue, 8 Jan 2013 07:07:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751397Ab3AHHHE (ORCPT ); Tue, 8 Jan 2013 02:07:04 -0500 Received: from mail-pb0-f44.google.com ([209.85.160.44]:42123 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923Ab3AHHHC (ORCPT ); Tue, 8 Jan 2013 02:07:02 -0500 Received: by mail-pb0-f44.google.com with SMTP id uo1so63328pbc.17 for ; Mon, 07 Jan 2013 23:07:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=6mt6Ow06Sli2iqA4PNXaHyINLPNXNTpER3Xy6+ygz/E=; b=XsqqhfgROO52C5sh61LDMeMpsbh6c+2ejdyGLVXdhBd8EaYdTZGpdlHwGkNLg5+Ly4 8TsAY3Odn8LKG0nhK9gFdFGeeoUzaYqEAJrETqUefhhXyYFEJrQx8exoEu1UfUoaugQj Pd7qn8MzHNFX1EGAavZTLf6N7v6SyPh4tsBBMkEmRVNVD9PapafdfGxS5Qdjq1hcsL75 Qac1WrQNZDXR2VgUtRtHtX/qn09WBZk5e/VhJuQKps9CK5q2PCPiKWXvRLlvXfPglMvY g4XWpu19bYZ403Ac2cjBReJ1U+G3icyucD7IhetMP5l6Vx1+iAvkuvPFH4mxujdH1NEO yLHw== X-Received: by 10.68.135.99 with SMTP id pr3mr197252761pbb.151.1357628821805; Mon, 07 Jan 2013 23:07:01 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id y9sm4598492paw.1.2013.01.07.23.06.59 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Jan 2013 23:07:01 -0800 (PST) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: s.nawrocki@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/1] [media] s5p-csis: Use devm_regulator_bulk_get API Date: Tue, 8 Jan 2013 12:28:51 +0530 Message-Id: <1357628331-18955-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQkqMmGVqtYRlVcLnL0N+cAcB4t7C5fTmGXb5cvc9WKh47ukXJ78LFQUHMWfOZwwpINpdVao Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org devm_regulator_bulk_get is device managed and saves some cleanup and exit code. Signed-off-by: Sachin Kamat --- drivers/media/platform/s5p-fimc/mipi-csis.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/s5p-fimc/mipi-csis.c b/drivers/media/platform/s5p-fimc/mipi-csis.c index cde510f..7e36ad9 100644 --- a/drivers/media/platform/s5p-fimc/mipi-csis.c +++ b/drivers/media/platform/s5p-fimc/mipi-csis.c @@ -743,7 +743,7 @@ static int s5pcsis_probe(struct platform_device *pdev) for (i = 0; i < CSIS_NUM_SUPPLIES; i++) state->supplies[i].supply = csis_supply_name[i]; - ret = regulator_bulk_get(&pdev->dev, CSIS_NUM_SUPPLIES, + ret = devm_regulator_bulk_get(&pdev->dev, CSIS_NUM_SUPPLIES, state->supplies); if (ret) return ret; @@ -762,7 +762,7 @@ static int s5pcsis_probe(struct platform_device *pdev) 0, dev_name(&pdev->dev), state); if (ret) { dev_err(&pdev->dev, "Interrupt request failed\n"); - goto e_regput; + goto e_clkput; } v4l2_subdev_init(&state->sd, &s5pcsis_subdev_ops); @@ -793,8 +793,6 @@ static int s5pcsis_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); return 0; -e_regput: - regulator_bulk_free(CSIS_NUM_SUPPLIES, state->supplies); e_clkput: clk_disable(state->clock[CSIS_CLK_MUX]); s5pcsis_clk_put(state); @@ -903,7 +901,6 @@ static int s5pcsis_remove(struct platform_device *pdev) clk_disable(state->clock[CSIS_CLK_MUX]); pm_runtime_set_suspended(&pdev->dev); s5pcsis_clk_put(state); - regulator_bulk_free(CSIS_NUM_SUPPLIES, state->supplies); media_entity_cleanup(&state->sd.entity);