linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] rt2x00pci: small 3290 changes cleanup
@ 2012-07-09 12:41 Stanislaw Gruszka
  2012-07-09 12:41 ` [PATCH 2/2] rt2800lib: merge same defines Stanislaw Gruszka
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stanislaw Gruszka @ 2012-07-09 12:41 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, users, Woody Hung, Stanislaw Gruszka

Fix indention and remove unnecessary brackets and compares.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/rt2x00/rt2800pci.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index dd43612..bf0e71e 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -986,7 +986,7 @@ static int rt2800_enable_wlan_rt3290(struct rt2x00_dev *rt2x00dev)
 	int i, count;
 
 	rt2800_register_read(rt2x00dev, WLAN_FUN_CTRL, &reg);
-	if ((rt2x00_get_field32(reg, WLAN_EN) == 1))
+	if (rt2x00_get_field32(reg, WLAN_EN))
 		return 0;
 
 	rt2x00_set_field32(&reg, WLAN_GPIO_OUT_OE_BIT_ALL, 0xff);
@@ -1004,9 +1004,9 @@ static int rt2800_enable_wlan_rt3290(struct rt2x00_dev *rt2x00dev)
 		 */
 		for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
 			rt2800_register_read(rt2x00dev, CMB_CTRL, &reg);
-			if ((rt2x00_get_field32(reg, PLL_LD) == 1) &&
-				(rt2x00_get_field32(reg, XTAL_RDY) == 1))
-					break;
+			if (rt2x00_get_field32(reg, PLL_LD) &&
+			    rt2x00_get_field32(reg, XTAL_RDY))
+				break;
 			udelay(REGISTER_BUSY_DELAY);
 		}
 
@@ -1022,9 +1022,8 @@ static int rt2800_enable_wlan_rt3290(struct rt2x00_dev *rt2x00dev)
 			rt2800_register_write(rt2x00dev, 0x58, 0x618);
 			udelay(REGISTER_BUSY_DELAY);
 			count++;
-		} else {
+		} else
 			count = 0;
-		}
 
 		rt2800_register_read(rt2x00dev, WLAN_FUN_CTRL, &reg);
 		rt2x00_set_field32(&reg, PCIE_APP0_CLK_REQ, 0);
-- 
1.7.1


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

end of thread, other threads:[~2012-07-11 19:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-09 12:41 [PATCH 1/2] rt2x00pci: small 3290 changes cleanup Stanislaw Gruszka
2012-07-09 12:41 ` [PATCH 2/2] rt2800lib: merge same defines Stanislaw Gruszka
2012-07-10  6:34   ` Helmut Schaa
2012-07-10  6:33 ` [PATCH 1/2] rt2x00pci: small 3290 changes cleanup Helmut Schaa
2012-07-10  9:59 ` Veli-Pekka Peltola
2012-07-11 19:15   ` John W. Linville

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).