linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: wilc1000: removes unnecessary retry 3 times
@ 2016-02-23 12:10 Leo Kim
  2016-02-23 12:10 ` [PATCH 2/2] staging: wilc1000: Revert "staging: wilc1000: remove spaces around '->'" Leo Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Leo Kim @ 2016-02-23 12:10 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

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>
---
 drivers/staging/wilc1000/wilc_wlan.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index d50ddc6..e5a83cc 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,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] staging: wilc1000: Revert "staging: wilc1000: remove spaces around '->'"
  2016-02-23 12:10 [PATCH 1/2] staging: wilc1000: removes unnecessary retry 3 times Leo Kim
@ 2016-02-23 12:10 ` Leo Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Leo Kim @ 2016-02-23 12:10 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This reverts commit 6c2ab2398b88 ("staging: wilc1000: remove spaces around '->'").
It had applied from a incorrectly commit a1b56a4c5054
("staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages").

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index a7aa3d2..0fd3a1e 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1928,7 +1928,7 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
 
 	priv = wiphy_priv(wiphy);
 	vif = netdev_priv(dev);
-	wl = vif ->wilc;
+	wl = vif->wilc;
 
 	s32Error = set_channel(wiphy, &settings->chandef);
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-23 12:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-23 12:10 [PATCH 1/2] staging: wilc1000: removes unnecessary retry 3 times Leo Kim
2016-02-23 12:10 ` [PATCH 2/2] staging: wilc1000: Revert "staging: wilc1000: remove spaces around '->'" Leo Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).