Commit a42c9b8
spi: sn-f-ospi: Use devm_mutex_init() to simplify code
Switch to devm_mutex_init() to handle mutex destruction automatically.
This simplifies the error paths in probe() and removes the need for an
explicit mutex_destroy() in remove() callback.
Signed-off-by: Felix Gu <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>1 parent ef3d549 commit a42c9b8
1 file changed
Lines changed: 5 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | | - | |
646 | | - | |
647 | | - | |
| 645 | + | |
648 | 646 | | |
649 | | - | |
| 647 | + | |
650 | 648 | | |
651 | | - | |
| 649 | + | |
652 | 650 | | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
| 651 | + | |
666 | 652 | | |
667 | | - | |
| 653 | + | |
668 | 654 | | |
669 | 655 | | |
670 | 656 | | |
| |||
679 | 665 | | |
680 | 666 | | |
681 | 667 | | |
682 | | - | |
683 | 668 | | |
684 | 669 | | |
685 | 670 | | |
| |||
0 commit comments