Commit e4d6347
spi: stm32-qspi: Update spi registering
Some device driver need to communicate to qspi device during the remove
process, qspi controller must be functional when spi_unregister_master()
is called.
To ensure this, replace devm_spi_register_master() by spi_register_master()
and spi_unregister_master() is called directly in .remove callback before
stopping the qspi controller.
This issue was put in evidence using kernel v5.11 and later
with a spi-nor which supports the software reset feature introduced
by commit d73ee75 ("mtd: spi-nor: core: perform a Soft Reset on
shutdown")
Fixes: c530cd1 ("spi: spi-mem: add stm32 qspi controller")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: <stable@vger.kernel.org> # 5.8.x
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/20220117121744.29729-1-patrice.chotard@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 44ea628 commit e4d6347
1 file changed
Lines changed: 17 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
691 | | - | |
| 691 | + | |
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
| |||
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
| 700 | + | |
| 701 | + | |
704 | 702 | | |
705 | 703 | | |
706 | 704 | | |
707 | 705 | | |
708 | 706 | | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
| 707 | + | |
| 708 | + | |
713 | 709 | | |
714 | 710 | | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
| 711 | + | |
| 712 | + | |
719 | 713 | | |
720 | 714 | | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
| 715 | + | |
| 716 | + | |
725 | 717 | | |
726 | 718 | | |
727 | 719 | | |
728 | 720 | | |
729 | 721 | | |
730 | | - | |
| 722 | + | |
731 | 723 | | |
732 | 724 | | |
733 | 725 | | |
734 | 726 | | |
735 | 727 | | |
736 | 728 | | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
| 729 | + | |
| 730 | + | |
741 | 731 | | |
742 | 732 | | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
| 733 | + | |
| 734 | + | |
747 | 735 | | |
748 | 736 | | |
749 | 737 | | |
750 | 738 | | |
751 | | - | |
| 739 | + | |
752 | 740 | | |
753 | 741 | | |
754 | 742 | | |
| |||
784 | 772 | | |
785 | 773 | | |
786 | 774 | | |
787 | | - | |
| 775 | + | |
788 | 776 | | |
789 | 777 | | |
790 | 778 | | |
| |||
806 | 794 | | |
807 | 795 | | |
808 | 796 | | |
809 | | - | |
810 | | - | |
811 | 797 | | |
812 | 798 | | |
813 | 799 | | |
| |||
817 | 803 | | |
818 | 804 | | |
819 | 805 | | |
| 806 | + | |
820 | 807 | | |
821 | 808 | | |
822 | 809 | | |
| |||
0 commit comments