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: 9753411 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 E2E9B6038E for ; Mon, 29 May 2017 15:47:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D75CE25EA6 for ; Mon, 29 May 2017 15:47:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA9B8237A5; Mon, 29 May 2017 15:47:22 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FE0B237A5 for ; Mon, 29 May 2017 15:47:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751408AbdE2Pqz (ORCPT ); Mon, 29 May 2017 11:46:55 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:37384 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751389AbdE2Pqw (ORCPT ); Mon, 29 May 2017 11:46:52 -0400 Received: by mail-wm0-f44.google.com with SMTP id d127so64536786wmf.0 for ; Mon, 29 May 2017 08:46:51 -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=DWaPSxzh+/JJD6MKhCynyvJkPogHhaVLWsMfyrvoTlnRYZgaPuN8xUzpGkvrq8JSfG ccx8huaXTZ6Vzrp/PuN0xp4OsGWdPLI+AAbst8CQUIQk5mD5ivuRDzCUZaj4IETGWYxl zAzPlXmTP5bE3yOnWEJRCD0cdJ4gSNewlPnykS0zmYixo+35lKM+apCZkEE8kkxJUmYC ITxcwenPcRCwsAJPLFBYyxhoWZinnLiBXJE8/T/jfuqVsbvsiMknPFG6tH1SQ8/dRZ3A Ly0FpvyUM3VbkQxhz4bTiyvjyYAXdsNITab8dyvy7RGoWSVgoFKV6MiaCuhLSFnMClAL j/Ig== X-Gm-Message-State: AODbwcC5lMqPsZlWZgSC5lL7YKIIfow53NXYoIXriYhgvNTSQAIaV9OP lfJQ2AQW+ai/vruc 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 Cc: Benjamin Gaignard , Kyungmin Park , Sylwester Nawrocki , Mauro Carvalho Chehab , Kukjin Kim , Krzysztof Kozlowski , Javier Martinez Canillas , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org 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> To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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);