@@ -559,15 +559,13 @@ static void steam_set_lizard_mode(struct steam_device *steam, bool enable)
559
559
if (steam -> gamepad_mode )
560
560
enable = false;
561
561
562
+ mutex_lock (& steam -> report_mutex );
562
563
if (enable ) {
563
- mutex_lock (& steam -> report_mutex );
564
564
/* enable esc, enter, cursors */
565
565
steam_send_report_byte (steam , ID_SET_DEFAULT_DIGITAL_MAPPINGS );
566
566
/* reset settings */
567
567
steam_send_report_byte (steam , ID_LOAD_DEFAULT_SETTINGS );
568
- mutex_unlock (& steam -> report_mutex );
569
568
} else {
570
- mutex_lock (& steam -> report_mutex );
571
569
/* disable esc, enter, cursor */
572
570
steam_send_report_byte (steam , ID_CLEAR_DIGITAL_MAPPINGS );
573
571
@@ -579,15 +577,14 @@ static void steam_set_lizard_mode(struct steam_device *steam, bool enable)
579
577
SETTING_RIGHT_TRACKPAD_CLICK_PRESSURE , 0xFFFF , /* disable haptic click */
580
578
SETTING_STEAM_WATCHDOG_ENABLE , 0 , /* disable watchdog that tests if Steam is active */
581
579
0 );
582
- mutex_unlock (& steam -> report_mutex );
583
580
} else {
584
581
steam_write_settings (steam ,
585
582
SETTING_LEFT_TRACKPAD_MODE , TRACKPAD_NONE , /* disable mouse */
586
583
SETTING_RIGHT_TRACKPAD_MODE , TRACKPAD_NONE , /* disable mouse */
587
584
0 );
588
- mutex_unlock (& steam -> report_mutex );
589
585
}
590
586
}
587
+ mutex_unlock (& steam -> report_mutex );
591
588
}
592
589
593
590
static int steam_input_open (struct input_dev * dev )
0 commit comments