Skip to contentSkip to conversation

rb532: fix id usage

PATCH In review Florian Fainelli 1 participant 1 message Aug 21, 2008 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 6/6 rb532: fix id usage

When there is only platform device of the same type, id = -1 should be used, fix this.

---

arch/mips/rb532/devices.c +3 -3
index 7b91d69..3007357 100644
@@ -90,7 +90,7 @@ static struct korina_device korina_dev0_data = {
 };
 
 static struct platform_device korina_dev0 = {
-	.id = 0,
+	.id = -1,
 	.name = "korina",
 	.dev.platform_data = &korina_dev0_data,
 	.resource = korina_dev0_res,
@@ -114,7 +114,7 @@ static struct cf_device cf_slot0_data = {
 };
 
 static struct platform_device cf_slot0 = {
-	.id = 0,
+	.id = -1,
 	.name = "pata-rb532-cf",
 	.dev.platform_data = &cf_slot0_data,
 	.resource = cf_slot0_res,
@@ -179,7 +179,7 @@ static struct mtd_partition rb532_partition_info[] = {
 
 static struct platform_device rb532_led = {
 	.name = "rb532-led",
-	.id = 0,
+	.id = -1,
 };
 
 static struct gpio_keys_button rb532_gpio_btn[] = {