From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964832AbbJ0PPD (ORCPT ); Tue, 27 Oct 2015 11:15:03 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:64284 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932425AbbJ0PPB (ORCPT ); Tue, 27 Oct 2015 11:15:01 -0400 From: "Rafael J. Wysocki" To: Tomeu Vizoso Cc: "linux-kernel@vger.kernel.org" , Rob Herring , Stephen Warren , Javier Martinez Canillas , Greg Kroah-Hartman , Mark Brown , Thierry Reding , Alan Stern , "linux-arm-kernel@lists.infradead.org" , Dmitry Torokhov , "devicetree@vger.kernel.org" , Linus Walleij , linux-acpi@vger.kernel.org, Arnd Bergmann Subject: Re: [PATCH v6 03/22] of/platform: Point to struct device from device node Date: Tue, 27 Oct 2015 16:43:53 +0100 Message-ID: <3956941.s3nuWak5tq@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.1.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1442844182-27787-1-git-send-email-tomeu.vizoso@collabora.com> <1806288.pmhamH8mKQ@vostro.rjw.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, October 27, 2015 03:48:40 PM Tomeu Vizoso wrote: > On 24 October 2015 at 15:57, Rafael J. Wysocki wrote: [...] > > > > Well, once that has happened, your new device pointer in the given device_node > > becomes useless. Why exactly is that fine? > > Why do you think it's useless? It's the device that was registered > from that device_node. The other one just happens to want to point to > the same device_node for whatever other reason, but I don't see how is > that relevant. It is useless as a reverse mapping from OF nodes to devices. It tells us which device pointing to the given device node has been found first, but that's just it. You can't say whether or not it is special in any way with respect to the other devices hanging out of the same OF node unless you have some additional information on how those devices are related to each other. Thanks, Rafael