OSDN Git Service

greybus: Generate greybus wide unique ids for endo devices
authorViresh Kumar <viresh.kumar@linaro.org>
Sun, 7 Jun 2015 03:43:15 +0000 (09:13 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 8 Jun 2015 22:18:02 +0000 (15:18 -0700)
commit4a0418700871936cddec3a2b3c5a029ec0b2d6a3
tree1a3786ef2647e482ef64325d19720ff5f1017651
parentd7353ceadaf96a60b4163177ec9f8202655f1ace
greybus: Generate greybus wide unique ids for endo devices

Currently we name the endo device as "endo". And it shows up with the
same name in sysfs directory: /sys/bus/greybus/devices/.

But each device in kernel should be represented by a unique id in
kernel, and "endo" isn't unique.

Lets generate unique ids for endo devices. The ida mechanism for
allocating ids may be overkill but it works.

Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/core.c
drivers/staging/greybus/endo.c
drivers/staging/greybus/endo.h