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

clk: pxa: Use __iomem properly and staticize lock variable

This function is passed an __iomem pointer but we use a u32
pointer instead which makes checkers like spare complain.
Furthermore, "lock" is a pretty poor variable name for a string
that will go into lockdep reports and the symbol isn't marked
static. Cleanup all this.

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

+6 -5
+4 -3
drivers/clk/pxa/clk-pxa.c
··· 38 38 #define MDREFR_DB2_MASK (MDREFR_K2DB2 | MDREFR_K1DB2) 39 39 #define MDREFR_DRI_MASK 0xFFF 40 40 41 - DEFINE_SPINLOCK(lock); 41 + static DEFINE_SPINLOCK(pxa_clk_lock); 42 42 43 43 static struct clk *pxa_clocks[CLK_MAX]; 44 44 static struct clk_onecell_data onecell_data = { ··· 109 109 pxa_clk->lp = clks[i].lp; 110 110 pxa_clk->hp = clks[i].hp; 111 111 pxa_clk->gate = clks[i].gate; 112 - pxa_clk->gate.lock = &lock; 112 + pxa_clk->gate.lock = &pxa_clk_lock; 113 113 clk = clk_register_composite(NULL, clks[i].name, 114 114 clks[i].parent_names, 2, 115 115 &pxa_clk->hw, &cken_mux_ops, ··· 155 155 } 156 156 157 157 void pxa2xx_cpll_change(struct pxa2xx_freq *freq, 158 - u32 (*mdrefr_dri)(unsigned int), u32 *mdrefr, u32 *cccr) 158 + u32 (*mdrefr_dri)(unsigned int), void __iomem *mdrefr, 159 + void __iomem *cccr) 159 160 { 160 161 unsigned int clkcfg = freq->clkcfg; 161 162 unsigned int unused, preset_mdrefr, postset_mdrefr;
+2 -2
drivers/clk/pxa/clk-pxa.h
··· 155 155 156 156 void pxa2xx_core_turbo_switch(bool on); 157 157 void pxa2xx_cpll_change(struct pxa2xx_freq *freq, 158 - u32 (*mdrefr_dri)(unsigned int), u32 *mdrefr, 159 - u32 *cccr); 158 + u32 (*mdrefr_dri)(unsigned int), void __iomem *mdrefr, 159 + void __iomem *cccr); 160 160 int pxa2xx_determine_rate(struct clk_rate_request *req, 161 161 struct pxa2xx_freq *freqs, int nb_freqs); 162 162