netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/8 v2] staging: et131x: Remove unnecessary i2c_wack variable
       [not found] <1408572883-9235-6-git-send-email-mark.einon@gmail.com>
@ 2014-08-21 15:02 ` Mark Einon
  0 siblings, 0 replies; only message in thread
From: Mark Einon @ 2014-08-21 15:02 UTC (permalink / raw)
  To: gregkh; +Cc: devel, netdev, linux-kernel, Mark Einon

i2c_wack is only used to implement a while(1) loop, so let's remove it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
---

Modified to remove function parameter indenting changes, which are
largely unrelated.

 drivers/staging/et131x/et131x.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index fc18e8d..245e048 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -573,7 +573,6 @@ static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data)
 	int index = 0;
 	int retries;
 	int err = 0;
-	int i2c_wack = 0;
 	int writeok = 0;
 	u32 status;
 	u32 val = 0;
@@ -599,8 +598,6 @@ static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data)
 			LBCIF_CONTROL_LBCIF_ENABLE | LBCIF_CONTROL_I2C_WRITE))
 		return -EIO;
 
-	i2c_wack = 1;
-
 	/* Prepare EEPROM address for Step 3 */
 
 	for (retries = 0; retries < MAX_NUM_WRITE_RETRIES; retries++) {
@@ -656,7 +653,7 @@ static int eeprom_write(struct et131x_adapter *adapter, u32 addr, u8 data)
 	 */
 	udelay(10);
 
-	while (i2c_wack) {
+	while (1) {
 		if (pci_write_config_byte(pdev, LBCIF_CONTROL_REGISTER,
 			LBCIF_CONTROL_LBCIF_ENABLE))
 			writeok = 0;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-21 15:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1408572883-9235-6-git-send-email-mark.einon@gmail.com>
2014-08-21 15:02 ` [PATCH 5/8 v2] staging: et131x: Remove unnecessary i2c_wack variable Mark Einon

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