From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH] of: Make of_find_node_by_path() handle /aliases Date: Wed, 19 Mar 2014 13:28:48 -0600 Message-ID: <5329EFF0.6030400@wwwdotorg.org> References: <1395179549-31345-1-git-send-email-pantelis.antoniou@konsulko.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1395179549-31345-1-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Pantelis Antoniou , Grant Likely Cc: Rob Herring , Matt Porter , Koen Kooi , Alison Chaiken , Dinh Nguyen , Jan Lubbe , Alexander Sverdlin , Michael Stickel , Guenter Roeck , Dirk Behme , Alan Tull , Sascha Hauer , Michael Bohan , Ionut Nicu , Michal Simek , Matt Ranostay , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Pete Popov , Dan Malek , Georgi Vlaev List-Id: devicetree@vger.kernel.org On 03/18/2014 03:52 PM, Pantelis Antoniou wrote: > Make of_find_node_by_path() handle aliases as prefixes. > > Originally by David Daney , but > reworked according to remark by Grant Likely. > > Handles all cases without allocating memory as requested by > Grant Likely Why not just introduce a new function of_find_node_by_alias()? A single unified function would make sense if the function did something like: (1) find my path, and return if found (2) if not found, fall back to searching /aliases. However, since this modified function takes 2 separate formats of input path based on whether it should search for an alias or not, it seems like 2 separate functions would be a better API. Perhaps the new API should simply be a wrapper around of_find_node_by_path, once the alias has been found? -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html