Skip to content
Commit 79dda609 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman
Browse files

greybus: endo: clean up id assignment code



Recently code was added (back) to assign a unique id to each
endo, so satisfy uniqueness requirements of the Linux device
subsystem.  An ID allocator is used to manage the space of IDs.

Now that we have gb_endo_init(), we can initialize the map there,
and fully hide the ID map within "endo.c".

The original functions gb_endo_id_alloc() and gb_endo_id_free()
provided a nice abstract interface, but the direct ID allocation
calls are quite simple, so just call them directly.

Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent f35ab903
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment