firewire: core: replace IDR with XArray to maintain fw_device
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 12 Aug 2024 01:42:50 +0000 (10:42 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 12 Aug 2024 01:42:50 +0000 (10:42 +0900)
commit7e5a7725a0e4030cf37f8b93ff9d4328166a3b85
tree441fb4886f85bbcc5b1b53bea89d16c20db572ed
parentebb9d3ca8f7efc1b6a2f1750d1058eda444883d0
firewire: core: replace IDR with XArray to maintain fw_device

In core function, the instances of fw_device corresponding to firewire device
node in system are maintained by IDR. As of kernel v6.0, IDR has been
superseded by XArray and deprecated.

This commit replaces the usage of IDR with XArray to maintain the device
instances. The instance of XArray is allocated statically, and
initialized with XA_FLAGS_ALLOC so that the index of allocated entry starts
with zero and available as the minor identifier of device node.

Link: https://lore.kernel.org/r/20240812014251.165492-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
drivers/firewire/core-device.c
drivers/firewire/core-transaction.c
drivers/firewire/core.h