summaryrefslogtreecommitdiffstats
path: root/drivers/clk/ti/composite.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2016-02-20 02:49:23 +0100
committerStephen Boyd <sboyd@codeaurora.org>2016-02-27 01:01:32 +0100
commit921bacfa34d48c019bb068257c0947d728662bf3 (patch)
tree834bcfc833f2819d7b4103536086c2f90569bcd7 /drivers/clk/ti/composite.c
parentclk: sunxi: Use proper type for of_clk_get_parent_count() return value (diff)
downloadlinux-921bacfa34d48c019bb068257c0947d728662bf3.tar.xz
linux-921bacfa34d48c019bb068257c0947d728662bf3.zip
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>
Diffstat (limited to 'drivers/clk/ti/composite.c')
-rw-r--r--drivers/clk/ti/composite.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/clk/ti/composite.c b/drivers/clk/ti/composite.c
index 43345c417815..1cf70f452e1e 100644
--- a/drivers/clk/ti/composite.c
+++ b/drivers/clk/ti/composite.c
@@ -234,14 +234,14 @@ cleanup:
static void __init of_ti_composite_clk_setup(struct device_node *node)
{
- int num_clks;
+ unsigned int num_clks;
int i;
struct clk_hw_omap_comp *cclk;
/* Number of component clocks to be put inside this clock */
num_clks = of_clk_get_parent_count(node);
- if (num_clks < 1) {
+ if (!num_clks) {
pr_err("composite clk %s must have component(s)\n", node->name);
return;
}
@@ -271,13 +271,13 @@ CLK_OF_DECLARE(ti_composite_clock, "ti,composite-clock",
int __init ti_clk_add_component(struct device_node *node, struct clk_hw *hw,
int type)
{
- int num_parents;
+ unsigned int num_parents;
const char **parent_names;
struct component_clk *clk;
num_parents = of_clk_get_parent_count(node);
- if (num_parents < 1) {
+ if (!num_parents) {
pr_err("component-clock %s must have parent(s)\n", node->name);
return -EINVAL;
}