Skip to contentSkip to conversation

pasemi: only call of_platform_bus_probe() on relevant platforms

PATCH In review Olof Johansson 2 participants 2 messages May 1, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pasemi: only call of_platform_bus_probe() on relevant platforms

Only publish of_platform devices if running on a machine that has them.

arch/powerpc/platforms/pasemi/setup.c +4 -1
index f88f0ec..38bd903 100644
@@ -211,7 +211,10 @@ static struct of_device_id pasemi_bus_ids[] = {
 
 static int __init pasemi_publish_devices(void)
 {
-	/* Publish OF platform devices for southbridge IOs */
+	if (!machine_is(pasemi))
+		return 0;
+
+	/* Publish OF platform devices for SDC and other non-PCI devices */
 	of_platform_bus_probe(NULL, pasemi_bus_ids, NULL);
 
 	return 0;
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Olof Johansson

Only publish of_platform devices if running on a machine that has them.

Quoted 16 lines
arch/powerpc/platforms/pasemi/setup.c +4 -1
index f88f0ec..38bd903 100644
@@ -211,7 +211,10 @@ static struct of_device_id pasemi_bus_ids[] = {
 
 static int __init pasemi_publish_devices(void)
 {
-	/* Publish OF platform devices for southbridge IOs */
+	if (!machine_is(pasemi))
+		return 0;
+
+	/* Publish OF platform devices for SDC and other non-PCI devices */
 	of_platform_bus_probe(NULL, pasemi_bus_ids, NULL);
 
 	return 0;