diff options
| author | Nicholas Mc Guire <hofrat@osadl.org> | 2015-02-09 14:24:25 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-25 06:36:38 -0400 |
| commit | 860cba13432e071442a39e9bab83258c631d33a6 (patch) | |
| tree | 6370097df7346f6fa5504a95729dc550b188d981 /drivers/misc | |
| parent | a819a228feae6f936e2696c4946c53f883a3d480 (diff) | |
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 <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
| -rw-r--r-- | drivers/misc/carma/carma-fpga-program.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/misc/carma/carma-fpga-program.c b/drivers/misc/carma/carma-fpga-program.c index fff8c43d9943..0b1bd85e4ae6 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) | |||
| 479 | static noinline int fpga_program_cpu(struct fpga_dev *priv) | 479 | static noinline int fpga_program_cpu(struct fpga_dev *priv) |
| 480 | { | 480 | { |
| 481 | int ret; | 481 | int ret; |
| 482 | unsigned long timeout; | ||
| 482 | 483 | ||
| 483 | /* Disable the programmer */ | 484 | /* Disable the programmer */ |
| 484 | fpga_programmer_disable(priv); | 485 | fpga_programmer_disable(priv); |
| @@ -497,8 +498,8 @@ static noinline int fpga_program_cpu(struct fpga_dev *priv) | |||
| 497 | goto out_disable_controller; | 498 | goto out_disable_controller; |
| 498 | 499 | ||
| 499 | /* Wait for the interrupt handler to signal that programming finished */ | 500 | /* Wait for the interrupt handler to signal that programming finished */ |
| 500 | ret = wait_for_completion_timeout(&priv->completion, 2 * HZ); | 501 | timeout = wait_for_completion_timeout(&priv->completion, 2 * HZ); |
| 501 | if (!ret) { | 502 | if (!timeout) { |
| 502 | dev_err(priv->dev, "Timed out waiting for completion\n"); | 503 | dev_err(priv->dev, "Timed out waiting for completion\n"); |
| 503 | ret = -ETIMEDOUT; | 504 | ret = -ETIMEDOUT; |
| 504 | goto out_disable_controller; | 505 | goto out_disable_controller; |
| @@ -536,6 +537,7 @@ static noinline int fpga_program_dma(struct fpga_dev *priv) | |||
| 536 | struct sg_table table; | 537 | struct sg_table table; |
| 537 | dma_cookie_t cookie; | 538 | dma_cookie_t cookie; |
| 538 | int ret, i; | 539 | int ret, i; |
| 540 | unsigned long timeout; | ||
| 539 | 541 | ||
| 540 | /* Disable the programmer */ | 542 | /* Disable the programmer */ |
| 541 | fpga_programmer_disable(priv); | 543 | fpga_programmer_disable(priv); |
| @@ -623,8 +625,8 @@ static noinline int fpga_program_dma(struct fpga_dev *priv) | |||
| 623 | dev_dbg(priv->dev, "enabled the controller\n"); | 625 | dev_dbg(priv->dev, "enabled the controller\n"); |
| 624 | 626 | ||
| 625 | /* Wait for the interrupt handler to signal that programming finished */ | 627 | /* Wait for the interrupt handler to signal that programming finished */ |
| 626 | ret = wait_for_completion_timeout(&priv->completion, 2 * HZ); | 628 | timeout = wait_for_completion_timeout(&priv->completion, 2 * HZ); |
| 627 | if (!ret) { | 629 | if (!timeout) { |
| 628 | dev_err(priv->dev, "Timed out waiting for completion\n"); | 630 | dev_err(priv->dev, "Timed out waiting for completion\n"); |
| 629 | ret = -ETIMEDOUT; | 631 | ret = -ETIMEDOUT; |
| 630 | goto out_disable_controller; | 632 | goto out_disable_controller; |
