From patchwork Mon May 29 15:46:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 9753413 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BB6556038E for ; Mon, 29 May 2017 15:47:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE567237A5 for ; Mon, 29 May 2017 15:47:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A295C27FB6; Mon, 29 May 2017 15:47:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 38099237A5 for ; Mon, 29 May 2017 15:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=+VG3M2SI+vWuyQGFQDFso4AeLQUWQAlG3N7OUANXMgg=; b=JgCHDUubJy1aBZ2COxyOgGQ/oD Q1D1+iS50Efxg9EarEB2/xJQYhDZAY10F2XNSnZgQfjhNSDvpTRneXIa+WRP5Sd6UwIU4Gd9pKK5k E6D4dUToUoCkqwOKDLADQpV+GFOPcdnfVfa2G3pyFdgvIWP6J7cH35rLxPqrukgTrN2dvzdAPzPOI v9ytTr6NzumPU/AZ80/w8udqIQxuUvLl5sUOD6n8pFavqMAxatfnCaP5EFuS+zrrTVyrEfICB8qYM dBHNhnRw9OajvLo0YU0fIF6mqIcAolGuwTeGQxDzBz3br4wneuorbwAyorwAlPSuY+XaZ5NDZa1Xz oi/r6IKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dFMtF-0000qY-71; Mon, 29 May 2017 15:47:29 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dFMso-0008Vt-Bc for linux-arm-kernel@lists.infradead.org; Mon, 29 May 2017 15:47:04 +0000 Received: by mail-wm0-x233.google.com with SMTP id 7so60664659wmo.1 for ; Mon, 29 May 2017 08:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=twWxZ9n1pyjxLWPmioPBGc7AQNKEycwVRj+KJGxyZ+4=; b=heaGf2OiI1lPDmnqC54tmeEDo5PuTyaqZNSzOJsyJ+hBADOpD+/Rie38grungW7z3d kdu7fbb7CHOhHcJMGDBBDSYfsEdY/KfbQvKB/HvPaCwP9PDJR/cRoMxARLLYDH/fscaD jYdGXCs42NEbnHQWVXcMMgg3VE2W0CKMsTzXY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=twWxZ9n1pyjxLWPmioPBGc7AQNKEycwVRj+KJGxyZ+4=; b=EHHRXYI0fBRIYigaDvxjxkJsUuRHd4QFKBVpGwX7UlUZNLo0iNrCy2jHOI7LXWH5uj 5GqOjv/cNbVRjsg+ecl0vj/1OBXreaAkiCY7QXQ2OabH/mj2jRX49cseG6OS4EpxA2te mFPDJ1R4D/cNrTr8ZQLci7gq9MnpKU7JfLCmhCuMEb698Sm/UH7dbLqjX1za++WKaRX0 sfqeg/3j3EdJa8uiGXi3ryHfx45VdCs76IUM6439yqPXsjhGXnogsV3zJPLZBzIu1At2 iyMZmr9IOh/IVYccvQm0uJAujy27danUQCrnVC1mgKrpGIDTPVQriU87Z2xv7kVZ6BVg Q22g== X-Gm-Message-State: AODbwcAdzEEoRlsyI1sfbpWXt2i2GAHKFBrVuPbI9q9cL8UCOGQGfv06 3zYK1qwpKPt84uQX X-Received: by 10.223.134.238 with SMTP id 43mr10776652wry.80.1496072805697; Mon, 29 May 2017 08:46:45 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:45 -0700 (PDT) From: Benjamin Gaignard To: Subject: [PATCH 15/15] media: exynos4-is: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:46:03 +0200 Message-Id: <1496072763-31209-16-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170529_084702_645604_C6D374E0 X-CRM114-Status: GOOD ( 11.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Benjamin Gaignard , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Javier Martinez Canillas , Kyungmin Park , Kukjin Kim , Sylwester Nawrocki , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Usage of devm_of_platform_populate() simplify driver code and save somes lines Signed-off-by: Benjamin Gaignard CC: Kyungmin Park CC: Sylwester Nawrocki CC: Mauro Carvalho Chehab CC: Kukjin Kim CC: Krzysztof Kozlowski CC: Javier Martinez Canillas CC: linux-media@vger.kernel.org CC: linux-arm-kernel@lists.infradead.org CC: linux-samsung-soc@vger.kernel.org CC: linux-kernel@vger.kernel.org --- drivers/media/platform/exynos4-is/fimc-is.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c index 7f92144..340d906 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/exynos4-is/fimc-is.c @@ -854,7 +854,7 @@ static int fimc_is_probe(struct platform_device *pdev) vb2_dma_contig_set_max_seg_size(dev, DMA_BIT_MASK(32)); - ret = of_platform_populate(dev->of_node, NULL, NULL, dev); + ret = devm_of_platform_populate(dev); if (ret < 0) goto err_pm; @@ -864,7 +864,7 @@ static int fimc_is_probe(struct platform_device *pdev) */ ret = fimc_is_register_subdevs(is); if (ret < 0) - goto err_of_dep; + goto err_pm; ret = fimc_is_debugfs_create(is); if (ret < 0) @@ -883,8 +883,6 @@ static int fimc_is_probe(struct platform_device *pdev) fimc_is_debugfs_remove(is); err_sd: fimc_is_unregister_subdevs(is); -err_of_dep: - of_platform_depopulate(dev); err_pm: if (!pm_runtime_enabled(dev)) fimc_is_runtime_suspend(dev); @@ -946,7 +944,6 @@ static int fimc_is_remove(struct platform_device *pdev) if (!pm_runtime_status_suspended(dev)) fimc_is_runtime_suspend(dev); free_irq(is->irq, is); - of_platform_depopulate(dev); fimc_is_unregister_subdevs(is); vb2_dma_contig_clear_max_seg_size(dev); fimc_is_put_clocks(is);