Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp694112yba; Thu, 18 Apr 2019 08:05:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYVZqR0PKghB1X+9c+n4UJ3SF2rG/kQjEsk4xvOf2E4Nq2oIMGF7SgEZEpBMzaWZD2TcNc X-Received: by 2002:a17:902:e382:: with SMTP id ch2mr93464284plb.94.1555599954785; Thu, 18 Apr 2019 08:05:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555599954; cv=none; d=google.com; s=arc-20160816; b=zQxMGTVCeS9yh31fZEBv1TQbmbFCZmyAxIetjSuU7+myfuh0L+BLHwvcO2szgd00oD 0tbS6zDIFVU50T5iSD4t+f4UJc6OYl3Pa4M9fGYBZJz+HPaHvtRHhLPcaFIdkrzjyb4w 1JbLjwW8oBH/q6xmBq5Lb+vN9iGvSKEJfzp42/IFiVlUYRn5dSM+UcMyVUmSZqT6VnYT bwNSiJlOgAC86a6WEJrywjI6TVeUWFusBm0Ycqtwfckm9WS5OvqgaygalWm8YpTorKU0 1M/RJ8TtOpSas1RiindZvYnQ+U9ooGdKHlEXL2vX2SaWbmdkmBjPpjApx9L+wscUdsOD oAoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=do3Q5N7x+BKvIjW65j+I6ssMfSgJE+0G0vPbUd4LDhs=; b=agqKqFVJRcp4Lr0V81SEBi+FYqKHkq8/+C5Z77RUDIoMD98pcPixgvUe9wNUcr2YXd P6OaldUYVb7Zb+bSYJ1kEbwPpchE0oV07BAPYTD2KRGVPgXYriPv3AydCxclOT400VJR F1S4kKdrXSJdWjGQ1lH6nCzSWMzNUGgYZPkqnBFe1Q2NxdNj2v8V478En9UUOTkC4so3 WZU1qOhDpi9MMWJ05DBRgGR2bzsGsVUdJi9C5QjxzrBwIcjeoC0/FjUhE9dgcw4E4Mfu AawHdx8ezSYpq6ojry85W5TbjLxi3lVFC4H4jLRA1xlwapw6YQnWNilSs2AQNcQPC8lg Ne6w== ARC-Authentication-Results: i=1; mx.google.com; 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 v35si2369332plg.187.2019.04.18.08.05.39; Thu, 18 Apr 2019 08:05:54 -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; 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 S2389141AbfDRPD6 (ORCPT + 99 others); Thu, 18 Apr 2019 11:03:58 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:37233 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388457AbfDRPD6 (ORCPT ); Thu, 18 Apr 2019 11:03:58 -0400 Received: by mail-ed1-f66.google.com with SMTP id f53so2085317ede.4 for ; Thu, 18 Apr 2019 08:03:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=do3Q5N7x+BKvIjW65j+I6ssMfSgJE+0G0vPbUd4LDhs=; b=Yo0GGxFkJgPC1ts0iGP+fUpdFA/a/oC9BLDynE1ccYgk/KVkvfJY17HJ/ImYAMti6O wJxB+oaKTVoCkcr3RByvUn0wzTPqM8KNbUbKbkNr9arrYMwPh6NVCS9LZSB2vfl57f9L zcCljTnRDx6hq9oF10UAwyTLT7Z5K9W2S3zn0RwceT7IOUStqytKwsX5OKwRpie3LBMR 0xnYnjmVxv+Y8VNqFQnhhKJwFZIU+wOU67w7LRyLcR3bhzo1RYUSfNXJ22PoVib/R5KX 5NJB28jBsVI4PbSpy/5eteQHLYp5dz3V01bYXICEfrQ/f4FFnotzrcl5CcYyNL5Ubrej p6yA== X-Gm-Message-State: APjAAAVD7vcZwe0vn0HvxkCEnrsPztmCz2Olm6Xzbrr6DLp45676z0Bj BTb7X/B5jwf2ExAZTowckLuqu7Xv4r0= X-Received: by 2002:a50:e442:: with SMTP id e2mr20750097edm.227.1555599836112; Thu, 18 Apr 2019 08:03:56 -0700 (PDT) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com. [209.85.128.45]) by smtp.gmail.com with ESMTPSA id t51sm583660edb.30.2019.04.18.08.03.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 08:03:55 -0700 (PDT) Received: by mail-wm1-f45.google.com with SMTP id y197so3288549wmd.0 for ; Thu, 18 Apr 2019 08:03:55 -0700 (PDT) X-Received: by 2002:a1c:2394:: with SMTP id j142mr3501895wmj.111.1555599834885; Thu, 18 Apr 2019 08:03:54 -0700 (PDT) MIME-Version: 1.0 References: <20190418132727.5128-1-paul.kocialkowski@bootlin.com> <20190418132727.5128-4-paul.kocialkowski@bootlin.com> In-Reply-To: <20190418132727.5128-4-paul.kocialkowski@bootlin.com> From: Chen-Yu Tsai Date: Thu, 18 Apr 2019 08:03:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linux-sunxi] [PATCH 3/3] drm/sun4i: Fix component unbinding and component master deletion To: Paul Kocialkowski Cc: dri-devel , linux-arm-kernel , linux-kernel , linux-sunxi , Maxime Ripard , David Airlie , Daniel Vetter , Thomas Petazzoni Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 18, 2019 at 6:27 AM Paul Kocialkowski wrote: > > 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 > --- > 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 af07291544a4..0ea365e54de1 100644 > --- a/drivers/gpu/drm/sun4i/sun4i_drv.c > +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c > @@ -137,6 +137,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); Shouldn't this be before drm_dev_put? Everything being in reverse order of the complement calls in the bind function and all. The component drivers might still be using the drm dev before they are unbound. ChenYu > } > > static const struct component_master_ops sun4i_drv_master_ops = { > @@ -385,6 +387,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.21.0 > > -- > You received this message because you are subscribed to the Google Groups "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.