From 860cba13432e071442a39e9bab83258c631d33a6 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Mon, 9 Feb 2015 14:24:25 -0500 Subject: misc: carma: fixup return type of wait_for_completion_timeout return type of wait_for_completion_timeout is unsigned long not int. The rc variable is renamed timeout to reflect its use and the type adjusted to unsigned long. Signed-off-by: Nicholas Mc Guire Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/misc/carma/carma-fpga-program.c b/drivers/misc/carma/carma-fpga-program.c index fff8c43..0b1bd85 100644 --- a/drivers/misc/carma/carma-fpga-program.c +++ b/drivers/misc/carma/carma-fpga-program.c @@ -479,6 +479,7 @@ static int fpga_program_block(struct fpga_dev *priv, void *buf, size_t count) static noinline int fpga_program_cpu(struct fpga_dev *priv) { int ret; + unsigned long timeout; /* Disable the programmer */ fpga_programmer_disable(priv); @@ -497,8 +498,8 @@ static noinline int fpga_program_cpu(struct fpga_dev *priv) goto out_disable_controller; /* Wait for the interrupt handler to signal that programming finished */ - ret = wait_for_completion_timeout(&priv->completion, 2 * HZ); - if (!ret) { + timeout = wait_for_completion_timeout(&priv->completion, 2 * HZ); + if (!timeout) { dev_err(priv->dev, "Timed out waiting for completion\n"); ret = -ETIMEDOUT; goto out_disable_controller; @@ -536,6 +537,7 @@ static noinline int fpga_program_dma(struct fpga_dev *priv) struct sg_table table; dma_cookie_t cookie; int ret, i; + unsigned long timeout; /* Disable the programmer */ fpga_programmer_disable(priv); @@ -623,8 +625,8 @@ static noinline int fpga_program_dma(struct fpga_dev *priv) dev_dbg(priv->dev, "enabled the controller\n"); /* Wait for the interrupt handler to signal that programming finished */ - ret = wait_for_completion_timeout(&priv->completion, 2 * HZ); - if (!ret) { + timeout = wait_for_completion_timeout(&priv->completion, 2 * HZ); + if (!timeout) { dev_err(priv->dev, "Timed out waiting for completion\n"); ret = -ETIMEDOUT; goto out_disable_controller; -- cgit v0.10.2