From patchwork Thu Jul 20 22:06:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 108455 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp66565qge; Thu, 20 Jul 2017 15:06:29 -0700 (PDT) X-Received: by 10.98.112.137 with SMTP id l131mr5448892pfc.194.1500588389358; Thu, 20 Jul 2017 15:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500588389; cv=none; d=google.com; s=arc-20160816; b=CcHgkIXISEWavwyPOL8IvV+UyzpPBM7DIR71vuEcojRavUTe1oH2lVO1hU5DK0ao6V U5fEEE5ZmZUTdBxZ0kg5sTby7hr8Lb1BJBnFtsJNLpSGGs4ITjyiyNmq4ZJuewdNSNS8 4jNvrR6B4/GhJ00uKP6IHPhBl9NnYx0xexzKdQMwchYL6D9JBB8vECHPgTQfnjIzwUmn gNjH4Q4NzeHCuj94rzD1NKOvmna5HnkkkCyMt1Fmdm0BwNL0QMiLP1gwUzt3ZEh1lehq ryWCzMRDLgzP/qFE7A3swG//EISBHiDas4v6wuhYBnICjmUaZSf8RvljNKcGxI/XACLl n3og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=M/dCe3Y/gi2sFnUH43K4Hv+SKxsYN04ybWWAhcP305Y=; b=bjdbjb88M2gz+vfTzF7K8pTltBub1xsz60RhkGQAFO0MUMBN4Nc/3G6nUm2xkNQgYU D+XYVmjmNyJlZwn0YcH+QFRHQ+TmH5frBpGwemVyNKcpk/XzfG0E9QW6kD2Sjh/49Bwq v2Aeexj3C1F0951FEJl3hrU4bmXHVSI5PGG92sYxD/e8qRyfkkukshKcjZfMib+vGqxX gplfoWXj6uYyix3V0OAezUFceO32PhXQPH6LNGKLf/5+vRCSVglytaS5zcSM50JR0I9k g0GdvIjsVVwdV0/H4aji94VzFNmnsnNP+7ySJkMRF/jp0J8AyAiCmnJMkduW3lZA+SRX 6Kyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 193si2096197pfa.479.2017.07.20.15.06.29; Thu, 20 Jul 2017 15:06:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-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-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965544AbdGTWG1 (ORCPT + 4 others); Thu, 20 Jul 2017 18:06:27 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:34547 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964800AbdGTWG0 (ORCPT ); Thu, 20 Jul 2017 18:06:26 -0400 Received: by mail-yw0-f193.google.com with SMTP id a12so1591825ywh.1 for ; Thu, 20 Jul 2017 15:06:26 -0700 (PDT) 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; bh=M/dCe3Y/gi2sFnUH43K4Hv+SKxsYN04ybWWAhcP305Y=; b=m+AEuXt4uISys64AKid8dp477VuJ36/FN6i2adCuxkuH6pOT5ZhH8E3MDToeD1u/xF g/0iFV0RCcWW0LLF6EOcxLKHgYzBDaxQ4IqsiDLxRBnxhbpkDeZJEMHvYwFFGibSNT78 jRAHoApPbOwThlxcJ9/5MfRHOqayAebKWGZ8A+rKJOjXO1/OyiN+hqa5L7nOhBDpSv01 LbAts7cXo2gseFE8D/g+H1Cenf5dmdO97/c9yDgmTwM1iEBZA0a+2LQnIbiTf39lQK2e 9hl/rftfhcgSCCDAkQxBW0bz1lulgF4aSuya4FRJ9RE2CGsim2g+2uzbRJdVuhl+AVVY 3D0A== X-Gm-Message-State: AIVw113uQMNBYTESSD6uwZo5XDtztTn/v4CE57bjBsoNeyfx1RZGulq+ pAcwmaHXjXcLxP3Va5M= X-Received: by 10.129.209.10 with SMTP id w10mr4925893ywi.255.1500588386078; Thu, 20 Jul 2017 15:06:26 -0700 (PDT) Received: from localhost.localdomain (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.googlemail.com with ESMTPSA id m19sm1190876ywd.35.2017.07.20.15.06.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jul 2017 15:06:25 -0700 (PDT) From: Rob Herring To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, Sakari Ailus , Javi Merino , Javier Martinez Canillas , Sylwester Nawrocki , Frank Rowand Subject: [PATCH] Revert "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay" Date: Thu, 20 Jul 2017 17:06:22 -0500 Message-Id: <20170720220622.21470-1-robh@kernel.org> X-Mailer: git-send-email 2.11.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This reverts commit d2180e0cf77dc7a7049671d5d57dfa0a228f83c1. The commit was flawed in that if the device_node pointers are different, then in fact a different device is present and the device node could be different in ways other than full_name. As Frank Rowand explained: "When an overlay (1) is removed, all uses and references to the nodes and properties in that overlay are no longer valid. Any driver that uses any information from the overlay _must_ stop using any data from the overlay. Any driver that is bound to a new node in the overlay _must_ unbind. Any driver that became bound to a pre-existing node that was modified by the overlay (became bound after the overlay was applied) _must_ adjust itself to account for any changes to that node when the overlay is removed. One way to do this is to unbind when notified that the overlay is about to be removed, then to re-bind after the overlay is completely removed. If an overlay (2) is subsequently applied, a node with the same full_name as from overlay (1) may exist. There is no guarantee that overlay (1) and overlay (2) are the same overlay, even if that node has the same full_name in both cases." Also, there's not sufficient overlay support in mainline to actually remove and re-apply an overlay to hit this condition as overlays can only be applied from in kernel APIs. Cc: Mauro Carvalho Chehab Cc: Sakari Ailus Cc: Javi Merino Cc: Javier Martinez Canillas Cc: Sylwester Nawrocki Cc: Frank Rowand Signed-off-by: Rob Herring --- Mauro, please apply this for 4.13. It could be marked for stable, too, but it's not going to apply cleanly with the fwnode changes. Rob drivers/media/v4l2-core/v4l2-async.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.11.0 Acked-by: Javi Merino Acked-by: Sakari Ailus diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index 851f128eba22..d741a8e0fdac 100644 --- a/drivers/media/v4l2-core/v4l2-async.c +++ b/drivers/media/v4l2-core/v4l2-async.c @@ -44,12 +44,7 @@ static bool match_devname(struct v4l2_subdev *sd, static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd) { - if (!is_of_node(sd->fwnode) || !is_of_node(asd->match.fwnode.fwnode)) - return sd->fwnode == asd->match.fwnode.fwnode; - - return !of_node_cmp(of_node_full_name(to_of_node(sd->fwnode)), - of_node_full_name( - to_of_node(asd->match.fwnode.fwnode))); + return sd->fwnode == asd->match.fwnode.fwnode; } static bool match_custom(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)