Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp461777yba; Wed, 15 May 2019 04:31:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2+awoXfcGcq8lSdutLdBEdp1y3iR+SXpxWLk8DbgeCzSey/R7sT0rj0H19q5wZHss0gqG X-Received: by 2002:a63:2ace:: with SMTP id q197mr43135819pgq.371.1557919917997; Wed, 15 May 2019 04:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557919917; cv=none; d=google.com; s=arc-20160816; b=Dxg3+mk2Ggb9d/hZv18P/96G5I6Ui4UzZRPjNALjC6MOgWmbJTeEBuNs+LKAYXKSjs eSNZ/U1f7dfX1vv574l7/Tg2muTKSmInCW86xWaAQYzI8jU6N+IgTicSqDLJK5rflsNl 3rTApnVumQk+hN7Tz16bLWeogrgywp8NKhVp0B+neVufAXA6ggY0Rb6GlprtKQxmSQDT aYwWC93ToPAqpfOY73aWIbrY8v866hCflpi75pRyofZ+1jhhRfHJAVqWjmfpL/3lxg8U oE6zgj2DMbw+y/IG+zPh3fy4b7SattMa1RgP/gklOybHJQhO2vRJbPfe3JiYXX0ELEy4 6LZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FSJaXwiQuUCjm+tgF55A4teinC3aHGIUZLPqwd003Rc=; b=rKkg9uLl+AxGnHedH6/1BUB50WjOMAH0LGQ+M/VDYKnxaOC7A9oxb/NtIOXMwmJ4kS vVd2ugpQsf9vREU/BJbKJoRkhs/BuP7irNfSOE9MH7hUhfngrJVq/tzqWlIB7ZFpCe3S UWXKI7waFtR2sqQTRZaD7tUDJNrNq/mYkVIgJnp/I0i3XxqSugSpHw3EoTloGBt6fhE7 bc4UlYfNvFO128mwDNdCN3xa3NrlXo/np/RFiifIE9tDEvOybCrlrnr/h/oqMzEi+gx1 Ckwa+JToxK2zYYmWl0p+nyH/aXMp7xY3Ato0O43nCLtwDXD3DJHzoZlE5hBU/1xTTt83 TlQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E3IxbHZm; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si1523241pld.265.2019.05.15.04.31.43; Wed, 15 May 2019 04:31:57 -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=pass header.i=@kernel.org header.s=default header.b=E3IxbHZm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732476AbfEOL3B (ORCPT + 99 others); Wed, 15 May 2019 07:29:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:40170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732455AbfEOL27 (ORCPT ); Wed, 15 May 2019 07:28:59 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4D9D7206BF; Wed, 15 May 2019 11:28:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919738; bh=Zd5htjnTZHwxXTw8yCHhhFB/DukgYUXollEOlGdgmfQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E3IxbHZmxOeKWGDC6Hn3turgR28wrGzb+mg0JV5Z7vmoqki/byInpbsH8dxcIzPkR /1RLM76tOBiTtVHRRUrefCXfcN7mg7YiHsrOgdqq1KRIp9obb+pPUOfszFklJqP47W +37kNw0RWdcjUwj8l3UoOtl9d43eUpiYJQfEiCRw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Kocialkowski , Maxime Ripard , Sasha Levin Subject: [PATCH 5.0 073/137] drm/sun4i: Fix component unbinding and component master deletion Date: Wed, 15 May 2019 12:55:54 +0200 Message-Id: <20190515090658.734078697@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090651.633556783@linuxfoundation.org> References: <20190515090651.633556783@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit f5a9ed867c83875546c9aadd4ed8e785e9adcc3c ] For our component-backed driver to be properly removed, we need to delete the component master in sun4i_drv_remove and make sure to call component_unbind_all in the master's unbind so that all components are unbound when the master is. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190418132727.5128-4-paul.kocialkowski@bootlin.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/sun4i/sun4i_drv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index c6b65a9699794..9a5713fa03b25 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -148,6 +148,8 @@ static void sun4i_drv_unbind(struct device *dev) drm_mode_config_cleanup(drm); of_reserved_mem_device_release(dev); drm_dev_put(drm); + + component_unbind_all(dev, NULL); } static const struct component_master_ops sun4i_drv_master_ops = { @@ -395,6 +397,8 @@ static int sun4i_drv_probe(struct platform_device *pdev) static int sun4i_drv_remove(struct platform_device *pdev) { + component_master_del(&pdev->dev, &sun4i_drv_master_ops); + return 0; } -- 2.20.1