Commit ebf3f9a9 authored by Stephen Boyd's avatar Stephen Boyd

clk: h8300: Remove impossible check for of_clk_get_parent_count()

The checks for < 1 can be simplified now that
of_clk_get_parent_count() returns an unsigned int. Update the
code to reflect the int to unsigned int change.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: <uclinux-h8-devel@lists.sourceforge.jp>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 0985df89
...@@ -13,7 +13,7 @@ static DEFINE_SPINLOCK(clklock); ...@@ -13,7 +13,7 @@ static DEFINE_SPINLOCK(clklock);
static void __init h8300_div_clk_setup(struct device_node *node) static void __init h8300_div_clk_setup(struct device_node *node)
{ {
int num_parents; unsigned int num_parents;
struct clk *clk; struct clk *clk;
const char *clk_name = node->name; const char *clk_name = node->name;
const char *parent_name; const char *parent_name;
...@@ -22,7 +22,7 @@ static void __init h8300_div_clk_setup(struct device_node *node) ...@@ -22,7 +22,7 @@ static void __init h8300_div_clk_setup(struct device_node *node)
int offset; int offset;
num_parents = of_clk_get_parent_count(node); num_parents = of_clk_get_parent_count(node);
if (num_parents < 1) { if (!num_parents) {
pr_err("%s: no parent found", clk_name); pr_err("%s: no parent found", clk_name);
return; return;
} }
......
...@@ -83,7 +83,7 @@ static const struct clk_ops pll_ops = { ...@@ -83,7 +83,7 @@ static const struct clk_ops pll_ops = {
static void __init h8s2678_pll_clk_setup(struct device_node *node) static void __init h8s2678_pll_clk_setup(struct device_node *node)
{ {
int num_parents; unsigned int num_parents;
struct clk *clk; struct clk *clk;
const char *clk_name = node->name; const char *clk_name = node->name;
const char *parent_name; const char *parent_name;
...@@ -91,7 +91,7 @@ static void __init h8s2678_pll_clk_setup(struct device_node *node) ...@@ -91,7 +91,7 @@ static void __init h8s2678_pll_clk_setup(struct device_node *node)
struct clk_init_data init; struct clk_init_data init;
num_parents = of_clk_get_parent_count(node); num_parents = of_clk_get_parent_count(node);
if (num_parents < 1) { if (!num_parents) {
pr_err("%s: no parent found", clk_name); pr_err("%s: no parent found", clk_name);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment