On Mon, 18 Mar 2024, Martino Fontana wrote: > Previously, the leds pattern would just increment with every controller > connected. This wouldn't take into consideration when controllers are > disconnected. The same controller could be connected and disconnected > with the pattern increasing player count each time. > > This patch changes it by using an ID allocator in order to assign the > player id, the same way hid-playstation does. > > Signed-off-by: Martino Fontana <tinozzo123@xxxxxxxxx> > Signed-off-by: Ryan McClelland <rymcclel@xxxxxxxxx> > --- > Changes for v2: > > ida_free now frees the correct id, instead of an id that got moduloed. > > Changes for v3: > > Destroy allocator when removing driver. Applied, thanks. -- Jiri Kosina SUSE Labs