Skip to content

Commit 4784694

Browse files
author
Jiri Kosina
committed
Merge branch 'for-6.10/sony' into for-linus
2 parents 4fd2313 + 45bf5ed commit 4784694

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/hid/hid-sony.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,8 +1844,7 @@ static int sony_set_device_id(struct sony_sc *sc)
18441844
* All others are set to -1.
18451845
*/
18461846
if (sc->quirks & SIXAXIS_CONTROLLER) {
1847-
ret = ida_simple_get(&sony_device_id_allocator, 0, 0,
1848-
GFP_KERNEL);
1847+
ret = ida_alloc(&sony_device_id_allocator, GFP_KERNEL);
18491848
if (ret < 0) {
18501849
sc->device_id = -1;
18511850
return ret;
@@ -1861,7 +1860,7 @@ static int sony_set_device_id(struct sony_sc *sc)
18611860
static void sony_release_device_id(struct sony_sc *sc)
18621861
{
18631862
if (sc->device_id >= 0) {
1864-
ida_simple_remove(&sony_device_id_allocator, sc->device_id);
1863+
ida_free(&sony_device_id_allocator, sc->device_id);
18651864
sc->device_id = -1;
18661865
}
18671866
}
@@ -2016,8 +2015,6 @@ static int sony_input_configured(struct hid_device *hdev,
20162015

20172016
} else if (sc->quirks & MOTION_CONTROLLER) {
20182017
sony_init_output_report(sc, motion_send_output_report);
2019-
} else {
2020-
ret = 0;
20212018
}
20222019

20232020
if (sc->quirks & SONY_LED_SUPPORT) {

0 commit comments

Comments
 (0)