aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-01-19 01:42:15 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-19 16:27:15 -0500
commitb7c18c1b2636ecb9ad76759f99dac6efd441fa92 (patch)
tree10035a07cdcb5efee1d1b4a3371af2fea117cd64 /arch/sparc
parent62dfcd336c79c49f9aeb0acc99cf9a1832102dd5 (diff)
sparc64: Initialize FHC/CLOCK LED platform_device 'id' field correctly.
There is only one clock board, so use -1 as the 'id' so we get just the base name as the LED device name string. There are multiple FHC boards potentially in a system so use the board number as the 'id' value for that case. Reported-by: Meelis Roos <mroos@linux.ee> Tested-by: Meelis Roos <mroos@linux.ee> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/central.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c
index 05f1c916db06..f3b5466c389c 100644
--- a/arch/sparc/kernel/central.c
+++ b/arch/sparc/kernel/central.c
@@ -103,6 +103,7 @@ static int __devinit clock_board_probe(struct of_device *op,
103 p->leds_resource.name = "leds"; 103 p->leds_resource.name = "leds";
104 104
105 p->leds_pdev.name = "sunfire-clockboard-leds"; 105 p->leds_pdev.name = "sunfire-clockboard-leds";
106 p->leds_pdev.id = -1;
106 p->leds_pdev.resource = &p->leds_resource; 107 p->leds_pdev.resource = &p->leds_resource;
107 p->leds_pdev.num_resources = 1; 108 p->leds_pdev.num_resources = 1;
108 p->leds_pdev.dev.parent = &op->dev; 109 p->leds_pdev.dev.parent = &op->dev;
@@ -197,6 +198,7 @@ static int __devinit fhc_probe(struct of_device *op,
197 p->leds_resource.name = "leds"; 198 p->leds_resource.name = "leds";
198 199
199 p->leds_pdev.name = "sunfire-fhc-leds"; 200 p->leds_pdev.name = "sunfire-fhc-leds";
201 p->leds_pdev.id = p->board_num;
200 p->leds_pdev.resource = &p->leds_resource; 202 p->leds_pdev.resource = &p->leds_resource;
201 p->leds_pdev.num_resources = 1; 203 p->leds_pdev.num_resources = 1;
202 p->leds_pdev.dev.parent = &op->dev; 204 p->leds_pdev.dev.parent = &op->dev;