Commit dc2044e
spi: zynq-qspi: Simplify clock handling with devm_clk_get_enabled()
[ Upstream commit 1f8fd94 ]
Replace devm_clk_get() followed by clk_prepare_enable() with
devm_clk_get_enabled() for both "pclk" and "ref_clk". This removes
the need for explicit clock enable and disable calls, as the managed
API automatically disables the clocks on device removal or probe
failure.
Remove the now-unnecessary clk_disable_unprepare() calls from the
probe error paths and the remove callback. Simplify error handling
by jumping directly to the remove_ctlr label.
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/24043625f89376da36feca2408f990a85be7ab36.1775555500.git.xiaopei01@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: c9c0127 ("spi: zynq-qspi: fix controller deregistration")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent ae6ee9f commit dc2044e
1 file changed
Lines changed: 6 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | 382 | | |
384 | 383 | | |
385 | 384 | | |
386 | 385 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | 386 | | |
398 | 387 | | |
399 | 388 | | |
| |||
659 | 648 | | |
660 | 649 | | |
661 | 650 | | |
662 | | - | |
| 651 | + | |
663 | 652 | | |
664 | 653 | | |
665 | 654 | | |
| |||
668 | 657 | | |
669 | 658 | | |
670 | 659 | | |
671 | | - | |
| 660 | + | |
672 | 661 | | |
673 | 662 | | |
674 | 663 | | |
675 | 664 | | |
676 | 665 | | |
677 | 666 | | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | 667 | | |
691 | 668 | | |
692 | 669 | | |
693 | | - | |
| 670 | + | |
694 | 671 | | |
695 | 672 | | |
696 | 673 | | |
697 | 674 | | |
698 | 675 | | |
699 | 676 | | |
700 | | - | |
| 677 | + | |
701 | 678 | | |
702 | 679 | | |
703 | 680 | | |
| |||
707 | 684 | | |
708 | 685 | | |
709 | 686 | | |
710 | | - | |
| 687 | + | |
711 | 688 | | |
712 | 689 | | |
713 | 690 | | |
| |||
725 | 702 | | |
726 | 703 | | |
727 | 704 | | |
728 | | - | |
| 705 | + | |
729 | 706 | | |
730 | 707 | | |
731 | 708 | | |
732 | 709 | | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | 710 | | |
738 | 711 | | |
739 | 712 | | |
| |||
755 | 728 | | |
756 | 729 | | |
757 | 730 | | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | 731 | | |
762 | 732 | | |
763 | 733 | | |
| |||
0 commit comments