From patchwork Fri Feb 17 14:31:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 94161 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp194447qgi; Fri, 17 Feb 2017 06:31:49 -0800 (PST) X-Received: by 10.98.19.12 with SMTP id b12mr9617817pfj.150.1487341909500; Fri, 17 Feb 2017 06:31:49 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id i9si4284322pli.318.2017.02.17.06.31.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Feb 2017 06:31:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 668F16ED34; Fri, 17 Feb 2017 14:31:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) by gabe.freedesktop.org (Postfix) with ESMTPS id 65CB66ED2F for ; Fri, 17 Feb 2017 14:31:44 +0000 (UTC) Received: by mail-wm0-x230.google.com with SMTP id c85so16703102wmi.1 for ; Fri, 17 Feb 2017 06:31:44 -0800 (PST) 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=R+Itmz2Nm8ixdYR9egrVmFJ+UiPBlSRdVGIpGdIEO5U=; b=FssSesNzluIOpYoge2/aScci4raqL7wqNsPkVOMsBk3481Y8JXVWNdH5wBLHCQP2yJ WTotxn/Wk4J2OADjslTClYWxBBaqCjLpjfUo0Nh9QYgJiG5KXmPdaJbQmVVVOjXtCbYI 6B+6IXhP4F5X1qwBW2c46lSFcqnYOV88xWIyw= 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=R+Itmz2Nm8ixdYR9egrVmFJ+UiPBlSRdVGIpGdIEO5U=; b=gNN8PRmdEEP5IJl8f9K/nP+JxPEVSZSmrw+i+J6xIL4Yfh2rKM/QTMNM5HCh+1TvVY TjDfJDUmajIW2YVGuj8O8AwSJ2b52X2a5qW8HFQ2/ag66OklWxi3XnA84EIOpySR2+lu oqpg9yt7prKpDlCwavb8KeEixc1F/czDGJjUew180QlG7y3vqKD0IdE+I50/HpvPbyB0 anicDS1ZvX6szpwrMyBirTIaOtbK8qh1HMg/xRhCsbq4g3IhbaNhgMdEcjjEyjr32FF1 eVdS2tsjOarlI6L2CyjgtuYL91JxUreXO8rDgvR2Tpiyj/roMQ47LJQx53i5fqBFYT/Y bnVQ== X-Gm-Message-State: AMke39ntwWfvycCZSTbFLBgIyrYe4FVNgOJ/Vxy/qK1ot07rxq3nYVFPgVWFCMJiGvtNs6s0 X-Received: by 10.28.128.131 with SMTP id b125mr4048638wmd.7.1487341903078; Fri, 17 Feb 2017 06:31:43 -0800 (PST) Received: from lmenx321.st.com. ([80.215.97.44]) by smtp.gmail.com with ESMTPSA id g81sm1904593wmf.16.2017.02.17.06.31.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Feb 2017 06:31:42 -0800 (PST) From: Benjamin Gaignard To: robh+dt@kernel.org, frowand.list@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, vincent.abriou@st.com, dri-devel@lists.freedesktop.org Subject: [PATCH v1 2/2] drm: sti: make driver use devm_of_platform_populate() Date: Fri, 17 Feb 2017 15:31:26 +0100 Message-Id: <1487341886-13829-3-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1487341886-13829-1-git-send-email-benjamin.gaignard@linaro.org> References: <1487341886-13829-1-git-send-email-benjamin.gaignard@linaro.org> Cc: linaro-kernel@lists.linaro.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This make sure that of_platform_depopulate() is called if an error occur in probe after populating the date from the device tree. Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/sti/sti_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index ff71e25..01ef9a4 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -438,7 +438,7 @@ static int sti_platform_probe(struct platform_device *pdev) dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); - of_platform_populate(node, NULL, NULL, dev); + devm_of_platform_populate(dev, node, NULL, NULL, dev); child_np = of_get_next_available_child(node, NULL); @@ -454,7 +454,6 @@ static int sti_platform_probe(struct platform_device *pdev) static int sti_platform_remove(struct platform_device *pdev) { component_master_del(&pdev->dev, &sti_ops); - of_platform_depopulate(&pdev->dev); return 0; }