Commit 1f8fd94
spi: zynq-qspi: Simplify clock handling with devm_clk_get_enabled()
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>1 parent 591cd65 commit 1f8fd94
1 file changed
Lines changed: 6 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
385 | 384 | | |
386 | 385 | | |
387 | 386 | | |
388 | 387 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | 388 | | |
400 | 389 | | |
401 | 390 | | |
| |||
661 | 650 | | |
662 | 651 | | |
663 | 652 | | |
664 | | - | |
| 653 | + | |
665 | 654 | | |
666 | 655 | | |
667 | 656 | | |
| |||
670 | 659 | | |
671 | 660 | | |
672 | 661 | | |
673 | | - | |
| 662 | + | |
674 | 663 | | |
675 | 664 | | |
676 | 665 | | |
677 | 666 | | |
678 | 667 | | |
679 | 668 | | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | 669 | | |
693 | 670 | | |
694 | 671 | | |
695 | | - | |
| 672 | + | |
696 | 673 | | |
697 | 674 | | |
698 | 675 | | |
699 | 676 | | |
700 | 677 | | |
701 | 678 | | |
702 | | - | |
| 679 | + | |
703 | 680 | | |
704 | 681 | | |
705 | 682 | | |
| |||
709 | 686 | | |
710 | 687 | | |
711 | 688 | | |
712 | | - | |
| 689 | + | |
713 | 690 | | |
714 | 691 | | |
715 | 692 | | |
| |||
728 | 705 | | |
729 | 706 | | |
730 | 707 | | |
731 | | - | |
| 708 | + | |
732 | 709 | | |
733 | 710 | | |
734 | 711 | | |
735 | 712 | | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | 713 | | |
741 | 714 | | |
742 | 715 | | |
| |||
758 | 731 | | |
759 | 732 | | |
760 | 733 | | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | 734 | | |
765 | 735 | | |
766 | 736 | | |
| |||
0 commit comments