summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorLeo Kim <leo.kim@atmel.com>2016-02-23 21:10:53 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-25 22:29:05 -0800
commiteed9e5439f1bebf67a8d4f4af37bffe50e8d437d (patch)
tree9af3798fde865474fffd9bd406ef8d7a8ae0d360 /drivers/staging
parentcdc6cd28edb684f073234c059ab084c04eef9b32 (diff)
staging: wilc1000: removes unnecessary retry 3 times
This patch removes unnecessary retry 3 times and related variable. Actually the retry 3 times sentence, don't retry at all. Repeats conditions are that until read a chip-id and written a register. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/wilc1000/wilc_wlan.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index d50ddc6683bd..e5a83ccdbb49 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -477,7 +477,7 @@ EXPORT_SYMBOL_GPL(chip_allow_sleep);
void chip_wakeup(struct wilc *wilc)
{
- u32 reg, clk_status_reg, trials = 0;
+ u32 reg, clk_status_reg;
if ((wilc->io_type & 0x1) == HIF_SPI) {
do {
@@ -488,8 +488,7 @@ void chip_wakeup(struct wilc *wilc)
do {
usleep_range(2 * 1000, 2 * 1000);
wilc_get_chipid(wilc, true);
- } while ((wilc_get_chipid(wilc, true) == 0) && ((++trials % 3) == 0));
-
+ } while (wilc_get_chipid(wilc, true) == 0);
} while (wilc_get_chipid(wilc, true) == 0);
} else if ((wilc->io_type & 0x1) == HIF_SDIO) {
wilc->hif_func->hif_write_reg(wilc, 0xfa, 1);
@@ -501,7 +500,7 @@ void chip_wakeup(struct wilc *wilc)
wilc->hif_func->hif_read_reg(wilc, 0xf1,
&clk_status_reg);
- while (((clk_status_reg & 0x1) == 0) && (((++trials) % 3) == 0)) {
+ while ((clk_status_reg & 0x1) == 0) {
usleep_range(2 * 1000, 2 * 1000);
wilc->hif_func->hif_read_reg(wilc, 0xf1,