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: 100670 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395176qge; Mon, 29 May 2017 08:47:02 -0700 (PDT) X-Received: by 10.98.75.157 with SMTP id d29mr18507405pfj.135.1496072822516; Mon, 29 May 2017 08:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072822; cv=none; d=google.com; s=arc-20160816; b=GbfLeglWOf0apLfh046Qg30CSzGEUmq0awo+ur7/t1FeX3V1vOCIKDON18Fif7hkJS D3ZzUoRA4tdhZ/xOgsqX+PW4ZvGm+lmJcLxQ3z3jAL4beEtoYESlqE7m67gmRQGnwCLQ bQuofe/CC6v3ayJF2/pF74Ib7d8FKEkXW/qeAe5SLlhfXJIUpvo2HheBFkE1c8TYQII5 MDKkR4v6sbFC8iwWnK/Ko3hiVnuMRr2nESr+XvHsViyqhKtZHgS3g97UHzLdGxx8ubJ1 GHfsuyumoETYA8FHMKqLS7+GGVPj/qi6cOKgpmiJCS/cp1V7OGQSSjffmErtRAQtX/sz PNxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=twWxZ9n1pyjxLWPmioPBGc7AQNKEycwVRj+KJGxyZ+4=; b=gG+ntGn+uTDaMN8RM5TZZ7NzTpcMudDyonC8TWtCxb3CzHjCL3OFBWtO2Pyl73Gs+X 60V7Ucl4aqwjk5RIWk8R/lv3ORZGTbNMRHvzuyMcXG0SgdFmZTrdcX/vawQAka1aoEa8 pOW29bENMYwklzGarbktdiGYXxqzZBVUdKqPYBvTokV0dobBYPWS5ieHBzfW5KBq+nZg FABJo3iagjYhP9YyfPk8dMKbwe9ZQzw5vvlW4j5ThEhN61JZ0ZkaR673f/VPrFHSpjl8 ghyZA/GlD0HgHYCTBt8HvC6xKBum4jaGIrBTaDQoQwP692JYPBPrdp2hWTX01ys0SWk4 QY8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 190si9455906pgi.411.2017.05.29.08.47.02; Mon, 29 May 2017 08:47:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751426AbdE2Pq4 (ORCPT + 25 others); Mon, 29 May 2017 11:46:56 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:35570 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751387AbdE2Pqw (ORCPT ); Mon, 29 May 2017 11:46:52 -0400 Received: by mail-wm0-f52.google.com with SMTP id b84so60814281wmh.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=JI9LWifMH32Y277JrqBvNVCKJeNnR0Mic5pk+o4ZTjnMxswhbVC1btMlwfoUsl9+ZQ 9UZiGBsPDy3fcHCw0Xh/TFCYNn6uOW2GvzugdJPmdnEafB6I71fovgFwH9iE3vJmtTtu QIvNggMWlP4I4pfQPfOXnOJJ5sN90sousEm295/MMwBBvEUkdLUDSz4xJEqpVWumqCjW i+2bdseTJke2f81eos0hDmC3t/jY2x4eFqNlkS1qDQIS7pVJXJQ59O5QvXk5zdEPBnV1 BGZenxrz9HhSBS4OrrM/egl8ePIqONcuOld9weTKV68EOJlKrlOz4UQJP//IKK8YpoKZ 3jkA== X-Gm-Message-State: AODbwcA9DIFjLjy5LwVpFPrQWagLQtMUn0y67jIEXdk7jwbQzHilun9F qwQLAOIKyXVOdrMc 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 1.9.1 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);