From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752898AbdKMOjy convert rfc822-to-8bit (ORCPT ); Mon, 13 Nov 2017 09:39:54 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.216]:10095 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752653AbdKMOjv (ORCPT ); Mon, 13 Nov 2017 09:39:51 -0500 X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj4Qpw87WiutN1ETyY X-RZG-CLASS-ID: mo00 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [PATCH 2/3] Input: twl6040-vibra: fix child-node lookup From: "H. Nikolaus Schaller" In-Reply-To: <20171113141932.GV11226@localhost> Date: Mon, 13 Nov 2017 15:39:48 +0100 Cc: Peter Ujfalusi , Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, stable Content-Transfer-Encoding: 8BIT Message-Id: <94DB4354-C943-47B1-8D5A-A6AB615F2B9C@goldelico.com> References: <20171111154339.16875-1-johan@kernel.org> <20171111154339.16875-2-johan@kernel.org> <20171113141932.GV11226@localhost> To: Johan Hovold X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > Am 13.11.2017 um 15:19 schrieb Johan Hovold : > > On Mon, Nov 13, 2017 at 04:10:52PM +0200, Peter Ujfalusi wrote: > >> On 2017-11-11 17:43, Johan Hovold wrote: >>> Fix child-node lookup during probe, which ended up searching the whole >>> device tree depth-first starting at parent rather than just matching on >>> its children. >>> >>> Later sanity checks on node properties (which would likely be missing) >>> should prevent this from causing much trouble however, especially as the >>> original premature free of the parent node has already been fixed >>> separately (but that "fix" was apparently never backported to stable). >>> >>> Fixes: e7ec014a47e4 ("Input: twl6040-vibra - update for device tree support") >>> Fixes: c52c545ead97 ("Input: twl6040-vibra - fix DT node memory management") >>> Cc: stable # 3.6 >> >> Note that of_get_child_by_name() is not present in 3.6, this was the >> reason the original implementation was using of_find_node_by_name() > > Ah, ok. So the lookup would have needed to be open-coded using > for_each_child_of_node() back then, or if anyone wants to backport any > of these fixes to before v3.7. Just let me note that intensive DT support of OMAP4&5/ARM based boards didn't start before ca. v3.13. So it is very unlikely that anyone is running a twl6040 based board with older kernels. It is different for twl4030/omap3 which was used by several devices (N900, Pandora, GTA04) back in 2.6. So I don't see a reason to backport this change to any kernel older than 3.16. BR, Nikolaus Schaller