Commit 860cba13 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Greg Kroah-Hartman

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: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a819a228
...@@ -479,6 +479,7 @@ static int fpga_program_block(struct fpga_dev *priv, void *buf, size_t count) ...@@ -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) static noinline int fpga_program_cpu(struct fpga_dev *priv)
{ {
int ret; int ret;
unsigned long timeout;
/* Disable the programmer */ /* Disable the programmer */
fpga_programmer_disable(priv); fpga_programmer_disable(priv);
...@@ -497,8 +498,8 @@ static noinline int fpga_program_cpu(struct fpga_dev *priv) ...@@ -497,8 +498,8 @@ static noinline int fpga_program_cpu(struct fpga_dev *priv)
goto out_disable_controller; goto out_disable_controller;
/* Wait for the interrupt handler to signal that programming finished */ /* Wait for the interrupt handler to signal that programming finished */
ret = wait_for_completion_timeout(&priv->completion, 2 * HZ); timeout = wait_for_completion_timeout(&priv->completion, 2 * HZ);
if (!ret) { if (!timeout) {
dev_err(priv->dev, "Timed out waiting for completion\n"); dev_err(priv->dev, "Timed out waiting for completion\n");
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
goto out_disable_controller; goto out_disable_controller;
...@@ -536,6 +537,7 @@ static noinline int fpga_program_dma(struct fpga_dev *priv) ...@@ -536,6 +537,7 @@ static noinline int fpga_program_dma(struct fpga_dev *priv)
struct sg_table table; struct sg_table table;
dma_cookie_t cookie; dma_cookie_t cookie;
int ret, i; int ret, i;
unsigned long timeout;
/* Disable the programmer */ /* Disable the programmer */
fpga_programmer_disable(priv); fpga_programmer_disable(priv);
...@@ -623,8 +625,8 @@ static noinline int fpga_program_dma(struct fpga_dev *priv) ...@@ -623,8 +625,8 @@ static noinline int fpga_program_dma(struct fpga_dev *priv)
dev_dbg(priv->dev, "enabled the controller\n"); dev_dbg(priv->dev, "enabled the controller\n");
/* Wait for the interrupt handler to signal that programming finished */ /* Wait for the interrupt handler to signal that programming finished */
ret = wait_for_completion_timeout(&priv->completion, 2 * HZ); timeout = wait_for_completion_timeout(&priv->completion, 2 * HZ);
if (!ret) { if (!timeout) {
dev_err(priv->dev, "Timed out waiting for completion\n"); dev_err(priv->dev, "Timed out waiting for completion\n");
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
goto out_disable_controller; goto out_disable_controller;
......
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