Commit 47846941 authored by Jiri Kosina's avatar Jiri Kosina

Merge branch 'for-6.10/sony' into for-linus

parents 4fd2313d 45bf5edd
...@@ -1844,8 +1844,7 @@ static int sony_set_device_id(struct sony_sc *sc) ...@@ -1844,8 +1844,7 @@ static int sony_set_device_id(struct sony_sc *sc)
* All others are set to -1. * All others are set to -1.
*/ */
if (sc->quirks & SIXAXIS_CONTROLLER) { if (sc->quirks & SIXAXIS_CONTROLLER) {
ret = ida_simple_get(&sony_device_id_allocator, 0, 0, ret = ida_alloc(&sony_device_id_allocator, GFP_KERNEL);
GFP_KERNEL);
if (ret < 0) { if (ret < 0) {
sc->device_id = -1; sc->device_id = -1;
return ret; return ret;
...@@ -1861,7 +1860,7 @@ static int sony_set_device_id(struct sony_sc *sc) ...@@ -1861,7 +1860,7 @@ static int sony_set_device_id(struct sony_sc *sc)
static void sony_release_device_id(struct sony_sc *sc) static void sony_release_device_id(struct sony_sc *sc)
{ {
if (sc->device_id >= 0) { 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; sc->device_id = -1;
} }
} }
...@@ -2016,8 +2015,6 @@ static int sony_input_configured(struct hid_device *hdev, ...@@ -2016,8 +2015,6 @@ static int sony_input_configured(struct hid_device *hdev,
} else if (sc->quirks & MOTION_CONTROLLER) { } else if (sc->quirks & MOTION_CONTROLLER) {
sony_init_output_report(sc, motion_send_output_report); sony_init_output_report(sc, motion_send_output_report);
} else {
ret = 0;
} }
if (sc->quirks & SONY_LED_SUPPORT) { if (sc->quirks & SONY_LED_SUPPORT) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment