FROMGIT: Bluetooth: Remove usage of the deprecated ida_simple_xx() API

[ Upstream commit 9c16d0c8d93e3d2a95c5ed927b061f244db75579 ]

ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().

Note that the upper limit of ida_simple_get() is exclusive, but the one of
ida_alloc_max() is inclusive. So a -1 has been added when needed.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Stable-dep-of: 84a4bb6548a2 ("Bluetooth: HCI: Remove HCI_AMP support")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit cdb6a094effd04a6700b05ccfd5624b9fa52d962
 https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux.git linux-6.1.y)

BUG=b:542900253
TEST=cq

Change-Id: Ife89e170a59685b6cdd1bb197fc8044bb757943f
Disallow-Recycled-Builds: test-failures
Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/8277454
Reviewed-by: Jędrzej Ciupis <jciupis@google.com>
Reviewed-by: Sean Paul <sean@poorly.run>
2 files changed