File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -1844,8 +1844,7 @@ static int sony_set_device_id(struct sony_sc *sc)
1844
1844
* All others are set to -1.
1845
1845
*/
1846
1846
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 );
1849
1848
if (ret < 0 ) {
1850
1849
sc -> device_id = -1 ;
1851
1850
return ret ;
@@ -1861,7 +1860,7 @@ static int sony_set_device_id(struct sony_sc *sc)
1861
1860
static void sony_release_device_id (struct sony_sc * sc )
1862
1861
{
1863
1862
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 );
1865
1864
sc -> device_id = -1 ;
1866
1865
}
1867
1866
}
@@ -2016,8 +2015,6 @@ static int sony_input_configured(struct hid_device *hdev,
2016
2015
2017
2016
} else if (sc -> quirks & MOTION_CONTROLLER ) {
2018
2017
sony_init_output_report (sc , motion_send_output_report );
2019
- } else {
2020
- ret = 0 ;
2021
2018
}
2022
2019
2023
2020
if (sc -> quirks & SONY_LED_SUPPORT ) {
You can’t perform that action at this time.
0 commit comments