Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: at91: clk-master: improve readability by using local variables

Improve readability in clk_sama7g5_master_set() by using local
variables.

Suggested-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20211011112719.3951784-6-claudiu.beznea@microchip.com
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Claudiu Beznea and committed by
Stephen Boyd
88bdeed3 c5538816

+3 -3
+3 -3
drivers/clk/at91/clk-master.c
··· 680 680 unsigned long flags; 681 681 unsigned int val, cparent; 682 682 unsigned int enable = status ? AT91_PMC_MCR_V2_EN : 0; 683 + unsigned int parent = master->parent << PMC_MCR_CSS_SHIFT; 684 + unsigned int div = master->div << MASTER_DIV_SHIFT; 683 685 684 686 spin_lock_irqsave(master->lock, flags); 685 687 ··· 691 689 regmap_update_bits(master->regmap, AT91_PMC_MCR_V2, 692 690 enable | AT91_PMC_MCR_V2_CSS | AT91_PMC_MCR_V2_DIV | 693 691 AT91_PMC_MCR_V2_CMD | AT91_PMC_MCR_V2_ID_MSK, 694 - enable | (master->parent << PMC_MCR_CSS_SHIFT) | 695 - (master->div << MASTER_DIV_SHIFT) | 696 - AT91_PMC_MCR_V2_CMD | 692 + enable | parent | div | AT91_PMC_MCR_V2_CMD | 697 693 AT91_PMC_MCR_V2_ID(master->id)); 698 694 699 695 cparent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;