Skip to contentSkip to conversation

bcm63xx: dev-enet: initialize shared_device_registered to 0

PATCH In review Florian Fainelli 2 participants 2 messages May 31, 2009 – Jun 1, 2009 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 5/10 bcm63xx: dev-enet: initialize shared_device_registered to 0

This patch initialize the shared_device_registered variable with 0, actually required for the check to be working.

---

arch/mips/bcm63xx/dev-enet.c +1 -1
index 51c2e5a..0298973 100644
@@ -28,7 +28,7 @@ static struct platform_device bcm63xx_enet_shared_device = {
 	.resource	= shared_res,
 };
 
-static int shared_device_registered;
+static int shared_device_registered = 0;
 
 static struct resource enet0_res[] = {
 	{
#1 lore raw
Quoted 12 lines · Florian Fainelli

This patch initialize the shared_device_registered variable with 0, actually required for the check to be working.

---

arch/mips/bcm63xx/dev-enet.c +0 -0
index 51c2e5a..0298973 100644

arch/mips/bcm63xx/dev-enet.c static struct platform_device bcm63xx_enet_shared_device = { · line 31

Quoted 5 lines
arch/mips/bcm63xx/dev-enet.c +1 -1
@@ -28,7 +28,7 @@ static struct platform_device bcm63xx_enet_shared_device = {
 	.resource	= shared_res,
 };
 
-static int shared_device_registered;
+static int shared_device_registered = 0;

This is bogus. The variable defaults to zero. Explicit initialization however will inflate the .data section. Dropped.

Ralf