aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorGravatar Jiri Kosina <jkosina@suse.com> 2024-05-14 13:57:33 +0200
committerGravatar Jiri Kosina <jkosina@suse.com> 2024-05-14 13:57:33 +0200
commit47846941b5c6e7f71853cf4bf6862f63d5ea2baf (patch)
treedc528c536cc45bd6a9c9b6ebdafb94aca4348f23 /drivers/hid
parentMerge branch 'for-6.10/playstation' into for-linus (diff)
parentHID: sony: Remove usage of the deprecated ida_simple_xx() API (diff)
downloadlinux-47846941b5c6e7f71853cf4bf6862f63d5ea2baf.tar.gz
linux-47846941b5c6e7f71853cf4bf6862f63d5ea2baf.tar.bz2
linux-47846941b5c6e7f71853cf4bf6862f63d5ea2baf.zip
Merge branch 'for-6.10/sony' into for-linus
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-sony.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index ebc0aa4e4345..5a07a91a89ae 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1844,8 +1844,7 @@ static int sony_set_device_id(struct sony_sc *sc)
* All others are set to -1.
*/
if (sc->quirks & SIXAXIS_CONTROLLER) {
- ret = ida_simple_get(&sony_device_id_allocator, 0, 0,
- GFP_KERNEL);
+ ret = ida_alloc(&sony_device_id_allocator, GFP_KERNEL);
if (ret < 0) {
sc->device_id = -1;
return ret;
@@ -1861,7 +1860,7 @@ static int sony_set_device_id(struct sony_sc *sc)
static void sony_release_device_id(struct sony_sc *sc)
{
if (sc->device_id >= 0) {
- ida_simple_remove(&sony_device_id_allocator, sc->device_id);
+ ida_free(&sony_device_id_allocator, sc->device_id);
sc->device_id = -1;
}
}
@@ -2016,8 +2015,6 @@ static int sony_input_configured(struct hid_device *hdev,
} else if (sc->quirks & MOTION_CONTROLLER) {
sony_init_output_report(sc, motion_send_output_report);
- } else {
- ret = 0;
}
if (sc->quirks & SONY_LED_SUPPORT) {