diff options
author | Grant Likely <grant.likely@linaro.org> | 2014-05-21 15:40:31 +0900 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-05-23 07:58:26 +0900 |
commit | 07e461cd7e73a84f0e3757932b93cc80976fd749 (patch) | |
tree | 1f3e2ce6e3c5c2d943b525078766499542aff9b3 /ipc | |
parent | eafd370dfe487facfdef499057f4eac9aa0b4bf5 (diff) |
of: Ensure unique names without sacrificing determinism
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>
Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: Rob Herring <robh@kernel.org>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions