From: Florian Meier Subject: Re: [PATCH] i2c: Fallback to of_node of parent Date: Sat, 16 Nov 2013 17:59:15 +0100 Message-ID: <5287A463.6020307@koalo.de> References: <528791EF.9060505@koalo.de> <20131116160601.GA8723@katana> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Wolfram Sang Cc: Stephen Warren , linux-i2c , linux-rpi-kernel , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-i2c@vger.kernel.org I have looked through all bus drivers and in most cases they have a corresponding line that could be removed. Although, this patch would break i2c-powermac, because it relies on the fact that of_node stays NULL. Any idea how to handle that? Greetings, Florian On 16.11.2013 17:11, Florian Meier wrote: > Ok, I will try to find all relevant lines. > Where is the best place to document this? > > Greetings, > Florian > > 2013/11/16 Wolfram Sang : >> >>> + if (!dev->of_node && dev->parent) >>> + dev->of_node = dev->parent->of_node; >>> + >> >> That is not enough. Current drivers could then have the assignment >> removed and even more important, this behaviour should be documented. >> >> Regards, >> >> Wolfram >>