From patchwork Mon May 29 15:45:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 9753383 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 E1A3F6038E for ; Mon, 29 May 2017 15:46:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5B11237A5 for ; Mon, 29 May 2017 15:46:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA87A27F86; Mon, 29 May 2017 15:46: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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 97E49237A5 for ; Mon, 29 May 2017 15:46:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D62F89131; Mon, 29 May 2017 15:46:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 38CD189131 for ; Mon, 29 May 2017 15:46:30 +0000 (UTC) Received: by mail-wm0-x22b.google.com with SMTP id e127so65978524wmg.1 for ; Mon, 29 May 2017 08:46:30 -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=Ly5xwPsXvcJIue9dG3HgoHZXjCPsDQPTLg28yUYQ5rQ=; b=QRj+rubINjY57Ik/daWUWqa6xUTlRRggSY0IddPy5k86i4VSG8Y20//xkeKqDCYAbc GIMEnI8H/Dqbi+A1XyRii5dr2xtDUNn/zFSZml6Js8dtkZQcikrYrMTOTJBYVLe+VDLj HzKn/Udqwd6k3NCD3+pxrIHTkTiE8HFH9tVmY= 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=Ly5xwPsXvcJIue9dG3HgoHZXjCPsDQPTLg28yUYQ5rQ=; b=IKUdG4aEeWfjAbvD3ImBQxedrCPrApyJLaI94FgDjCMADJW7biLSkeGD5Gb744T00f rIXY//bfx4Nrn7aAaKSzBuL3akGuYYVxkNrH1TiibPfPPUvTMiLBOBVwPH5mr8H01+M/ kKhrpyGhi/q1MO6DLK8vdLk6e8Ba90xlQRVLP8Cy3f6Fudg1cwj3Wf9q0Glt+kMz3slK bDyro9avki13VilYluiehAtK13f+5KH9SUww6PyqPGR4YcoAoLKu6yEhnUdIIDApgOki Pkm9R0d2aw558hbZ2f+2+DpaGq8QpsOU9e2mTbGDPGOZfL+ffkylKlHGuX315CeA9Pkp 3OZw== X-Gm-Message-State: AODbwcAp9JQFzW4ifBSFhbyNxCWk7do3lCePzs+wH3X4fna/5PuGE+Tn D/Ate8l7heN45Anf X-Received: by 10.223.132.39 with SMTP id 36mr10819926wrf.179.1496072788892; Mon, 29 May 2017 08:46:28 -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.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:28 -0700 (PDT) From: Benjamin Gaignard To: Subject: [PATCH 03/15] drm: zte: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:51 +0200 Message-Id: <1496072763-31209-4-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> Cc: Shawn Guo , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.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" X-Virus-Scanned: ClamAV using ClamSMTP Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard CC: Shawn Guo CC: David Airlie CC: dri-devel@lists.freedesktop.org CC: linux-kernel@vger.kernel.org --- drivers/gpu/drm/zte/zx_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c index 614e854..f2b1e5f 100644 --- a/drivers/gpu/drm/zte/zx_drm_drv.c +++ b/drivers/gpu/drm/zte/zx_drm_drv.c @@ -196,7 +196,7 @@ static int zx_drm_probe(struct platform_device *pdev) struct component_match *match = NULL; int ret; - ret = of_platform_populate(parent, NULL, NULL, dev); + ret = devm_of_platform_populate(dev); if (ret) return ret;