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

clk: ti: Update for of_clk_get_parent_count() returning unsigned int

Change the types here to unsigned int instead of int and update
the checks for == 0 instead < 1 to be more explicit about what's
going on now that of_clk_get_parent_count() has changed return
types.

Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

+8 -8
+1 -1
drivers/clk/ti/clockdomain.c
··· 109 109 struct clk_hw *clk_hw; 110 110 const char *clkdm_name = node->name; 111 111 int i; 112 - int num_clks; 112 + unsigned int num_clks; 113 113 114 114 num_clks = of_clk_get_parent_count(node); 115 115
+4 -4
drivers/clk/ti/composite.c
··· 234 234 235 235 static void __init of_ti_composite_clk_setup(struct device_node *node) 236 236 { 237 - int num_clks; 237 + unsigned int num_clks; 238 238 int i; 239 239 struct clk_hw_omap_comp *cclk; 240 240 241 241 /* Number of component clocks to be put inside this clock */ 242 242 num_clks = of_clk_get_parent_count(node); 243 243 244 - if (num_clks < 1) { 244 + if (!num_clks) { 245 245 pr_err("composite clk %s must have component(s)\n", node->name); 246 246 return; 247 247 } ··· 271 271 int __init ti_clk_add_component(struct device_node *node, struct clk_hw *hw, 272 272 int type) 273 273 { 274 - int num_parents; 274 + unsigned int num_parents; 275 275 const char **parent_names; 276 276 struct component_clk *clk; 277 277 278 278 num_parents = of_clk_get_parent_count(node); 279 279 280 - if (num_parents < 1) { 280 + if (!num_parents) { 281 281 pr_err("component-clock %s must have parent(s)\n", node->name); 282 282 return -EINVAL; 283 283 }
+1 -1
drivers/clk/ti/dpll.c
··· 374 374 init->ops = ops; 375 375 376 376 init->num_parents = of_clk_get_parent_count(node); 377 - if (init->num_parents < 1) { 377 + if (!init->num_parents) { 378 378 pr_err("%s must have parent(s)\n", node->name); 379 379 goto cleanup; 380 380 }
+2 -2
drivers/clk/ti/mux.c
··· 178 178 { 179 179 struct clk *clk; 180 180 void __iomem *reg; 181 - int num_parents; 181 + unsigned int num_parents; 182 182 const char **parent_names; 183 183 u8 clk_mux_flags = 0; 184 184 u32 mask = 0; ··· 261 261 static void __init of_ti_composite_mux_clk_setup(struct device_node *node) 262 262 { 263 263 struct clk_mux *mux; 264 - int num_parents; 264 + unsigned int num_parents; 265 265 u32 val; 266 266 267 267 mux = kzalloc(sizeof(*mux), GFP_KERNEL);