Repository navigation
Commit 00062a9
drivers/iio/adc/at91_adc.c: use clk_prepare_enable and clk_disable_unprepare
Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and
clk_enable, and clk_disable and clk_unprepare. They make the code more
concise, and ensure that clk_unprepare is called when clk_enable fails.
A simplified version of the semantic patch that introduces calls to these
functions is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression e;
@@
- clk_prepare(e);
- clk_enable(e);
+ clk_prepare_enable(e);
@@
expression e;
@@
- clk_disable(e);
- clk_unprepare(e);
+ clk_disable_unprepare(e);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>1 parent f5ed9c3 commit 00062a9
1 file changed
Lines changed: 9 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
| 592 | + | |
593 | 593 | | |
594 | | - | |
| 594 | + | |
| 595 | + | |
595 | 596 | | |
596 | 597 | | |
597 | 598 | | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | 599 | | |
605 | 600 | | |
606 | 601 | | |
607 | 602 | | |
608 | 603 | | |
609 | 604 | | |
610 | 605 | | |
611 | | - | |
| 606 | + | |
612 | 607 | | |
613 | | - | |
| 608 | + | |
| 609 | + | |
614 | 610 | | |
615 | 611 | | |
616 | 612 | | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | 613 | | |
624 | 614 | | |
625 | 615 | | |
| |||
681 | 671 | | |
682 | 672 | | |
683 | 673 | | |
684 | | - | |
685 | | - | |
686 | | - | |
| 674 | + | |
687 | 675 | | |
688 | | - | |
689 | | - | |
690 | | - | |
| 676 | + | |
691 | 677 | | |
692 | 678 | | |
693 | 679 | | |
| |||
705 | 691 | | |
706 | 692 | | |
707 | 693 | | |
708 | | - | |
709 | | - | |
| 694 | + | |
710 | 695 | | |
711 | 696 | | |
712 | 697 | | |
| |||
0 commit comments