File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -510,15 +510,13 @@ static int samsung_keypad_suspend(struct device *dev)
510510 struct samsung_keypad * keypad = platform_get_drvdata (pdev );
511511 struct input_dev * input_dev = keypad -> input_dev ;
512512
513- mutex_lock (& input_dev -> mutex );
513+ guard ( mutex ) (& input_dev -> mutex );
514514
515515 if (input_device_enabled (input_dev ))
516516 samsung_keypad_stop (keypad );
517517
518518 samsung_keypad_toggle_wakeup (keypad , true);
519519
520- mutex_unlock (& input_dev -> mutex );
521-
522520 return 0 ;
523521}
524522
@@ -528,15 +526,13 @@ static int samsung_keypad_resume(struct device *dev)
528526 struct samsung_keypad * keypad = platform_get_drvdata (pdev );
529527 struct input_dev * input_dev = keypad -> input_dev ;
530528
531- mutex_lock (& input_dev -> mutex );
529+ guard ( mutex ) (& input_dev -> mutex );
532530
533531 samsung_keypad_toggle_wakeup (keypad , false);
534532
535533 if (input_device_enabled (input_dev ))
536534 samsung_keypad_start (keypad );
537535
538- mutex_unlock (& input_dev -> mutex );
539-
540536 return 0 ;
541537}
542538
You can’t perform that action at this time.
0 commit comments