Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9fb9f962 authored by Jack Pham's avatar Jack Pham Committed by Stephen Boyd
Browse files

net: rmnet_usb: Fix assignment order of instances



Commit f0b04dee "net: rmnet_usb: Support multiple instances" changed
the storage of the pre-allocated control device structures by adding
them to a list. The problem with that approach is that across
disconnect/re-probe, each instance may not be re-associated with the
interface as used previously. This coupling must be ensured to allow
users of the control device files to continue to access the same
interfaces across subsystem restarts.

Fix this by creating the instances in a dynamically-allocated array.
Since we assume probe order is in increasing interface number per
USB device, use this to assign the same instance when the
device/interface is re-probed.

CRs-fixed: 453167
Change-Id: Ide20abdd7acf0194dfb9bbdd9d039a8888b23d93
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 4990f2b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment