summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-gpio.c
diff options
context:
space:
mode:
authorStephen Boyd2016-02-20 02:31:52 +0100
committerStephen Boyd2016-02-27 01:01:32 +0100
commit0985df89537e7fd5ec963c760f7860b5718510ce (patch)
treead532a98ea46da0ba04af3aaae1caf5974e86b75 /drivers/clk/clk-gpio.c
parentclk: at91: Remove impossible checks for of_clk_get_parent_count() (diff)
downloadkernel-qcow2-linux-0985df89537e7fd5ec963c760f7860b5718510ce.tar.gz
kernel-qcow2-linux-0985df89537e7fd5ec963c760f7860b5718510ce.tar.xz
kernel-qcow2-linux-0985df89537e7fd5ec963c760f7860b5718510ce.zip
clk: gpio: Remove impossible check for of_clk_get_parent_count() < 0
The check for < 0 is impossible now that of_clk_get_parent_count() returns an unsigned int. Simplify the code and update the type here. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/clk-gpio.c')
-rw-r--r--drivers/clk/clk-gpio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/clk-gpio.c b/drivers/clk/clk-gpio.c
index 522bffdbacc5..08f65acc5d57 100644
--- a/drivers/clk/clk-gpio.c
+++ b/drivers/clk/clk-gpio.c
@@ -205,15 +205,13 @@ static int gpio_clk_driver_probe(struct platform_device *pdev)
{
struct device_node *node = pdev->dev.of_node;
const char **parent_names, *gpio_name;
- int num_parents, gpio;
+ unsigned int num_parents;
+ int gpio;
enum of_gpio_flags of_flags;
struct clk *clk;
bool active_low, is_mux;
num_parents = of_clk_get_parent_count(node);
- if (num_parents < 0)
- num_parents = 0;
-
if (num_parents) {
parent_names = devm_kcalloc(&pdev->dev, num_parents,
sizeof(char *), GFP_KERNEL);