devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
To: Grant Likely <grant.likely@linaro.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v2 1/2] of: Ensure unique names without sacrificing determinism
Date: Sat, 24 May 2014 15:10:15 -0300	[thread overview]
Message-ID: <20140524181014.GA4011@arch.cereza> (raw)
In-Reply-To: <1400801769-4506-2-git-send-email-grant.likely@linaro.org>

On 23 May 08:36 AM, Grant Likely wrote:
> The way the driver core is implemented, every device using the same bus
> type is required to have a unique name because a symlink to each device
> is created in the appropriate /sys/bus/*/devices directory, and two
> identical names causes a collision.
> 
> The current code handles the requirement by using an globally
> incremented counter that is appended to the device name. It works, but
> it means any change to device registration will change the assigned
> numbers. Instead, if we build up the name by using information from the
> parent nodes, then it can be guaranteed to be unique without adding a
> random number to the end of it.
> 
> Signed-off-by: Grant Likely <grant.likely@linaro.org>

Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>

-- 
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar

  parent reply	other threads:[~2014-05-24 18:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22 23:36 [PATCH v2 0/2] of: Clean up naming of platform devices Grant Likely
     [not found] ` <1400801769-4506-1-git-send-email-grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-05-22 23:36   ` [PATCH v2 1/2] of: Ensure unique names without sacrificing determinism Grant Likely
2014-05-23 13:59     ` Rob Herring
2014-05-24 18:10     ` Ezequiel Garcia [this message]
2014-05-22 23:36 ` [PATCH v2 2/2] of: Stop naming platform_device using dcr address Grant Likely
     [not found]   ` <1400801769-4506-3-git-send-email-grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-05-23 14:07     ` Arnd Bergmann
2014-05-27 12:47       ` Grant Likely
2014-05-24  4:10     ` Benjamin Herrenschmidt
2014-05-26  9:21       ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140524181014.GA4011@arch.cereza \
    --to=ezequiel@vanguardiasur.com.ar \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).