Skip to contentSkip to conversation

leds: blinkm: clean up double assignment to data->i2c_addr

PATCH Applied Colin King 4 participants 4 messages Mar 30, 2019 – Apr 2, 2019

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 leds: blinkm: clean up double assignment to data->i2c_addr

From: Colin Ian King <[email protected]>

Currently data->i2c_addr is being assigned twice, first with the value 0x09 and then immediately afterwards with the value 0x08. The first assignment is redundant and can be removed.

---
 drivers/leds/leds-blinkm.c | 1 -
 1 file changed, 1 deletion(-)
drivers/leds/leds-blinkm.c +0 -1
index 851c1920b63c..11b771fb933b 100644
@@ -594,7 +594,6 @@ static int blinkm_probe(struct i2c_client *client,
 		goto exit;
 	}
 
-	data->i2c_addr = 0x09;
 	data->i2c_addr = 0x08;
 	/* i2c addr  - use fake addr of 0x08 initially (real is 0x09) */
 	data->fw_ver = 0xfe;
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Colin King

From: Colin Ian King <[email protected]>

Currently data->i2c_addr is being assigned twice, first with the value 0x09 and then immediately afterwards with the value 0x08. The first assignment is redundant and can be removed.

Cheers,
-Mukesh

Quoted 16 lines
---
  drivers/leds/leds-blinkm.c | 1 -
  1 file changed, 1 deletion(-)
drivers/leds/leds-blinkm.c +0 -1
index 851c1920b63c..11b771fb933b 100644
@@ -594,7 +594,6 @@ static int blinkm_probe(struct i2c_client *client,
  		goto exit;
  	}
 
-	data->i2c_addr = 0x09;
  	data->i2c_addr = 0x08;
  	/* i2c addr  - use fake addr of 0x08 initially (real is 0x09) */
  	data->fw_ver = 0xfe;
Acked-by on v1 1/1
#2 lore raw
In reply to Colin King
Quoted 7 lines · Colin King

From: Colin Ian King <[email protected]>

Currently data->i2c_addr is being assigned twice, first with the value 0x09 and then immediately afterwards with the value 0x08. The first assignment is redundant and can be removed.

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#3 lore raw
In reply to Colin King

Hi Colin,

Thank you for the patch.

Quoted 17 lines · Colin King

From: Colin Ian King <[email protected]>

Currently data->i2c_addr is being assigned twice, first with the value 0x09 and then immediately afterwards with the value 0x08. The first assignment is redundant and can be removed.

---
  drivers/leds/leds-blinkm.c | 1 -
  1 file changed, 1 deletion(-)
drivers/leds/leds-blinkm.c +0 -0
index 851c1920b63c..11b771fb933b 100644

drivers/leds/leds-blinkm.c static int blinkm_probe(struct i2c_client *client, · line 599

Quoted 7 lines
drivers/leds/leds-blinkm.c +0 -1
@@ -594,7 +594,6 @@ static int blinkm_probe(struct i2c_client *client,
  		goto exit;
  	}
 
-	data->i2c_addr = 0x09;
  	data->i2c_addr = 0x08;
  	/* i2c addr  - use fake addr of 0x08 initially (real is 0x09) */
  	data->fw_ver = 0xfe;

Applied.

Signature · 2 lines
Best regards,
Jacek Anaszewski