Commit b7c18c1b authored by David S. Miller's avatar David S. Miller

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: default avatarMeelis Roos <mroos@linux.ee>
Tested-by: default avatarMeelis Roos <mroos@linux.ee>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 62dfcd33
...@@ -103,6 +103,7 @@ static int __devinit clock_board_probe(struct of_device *op, ...@@ -103,6 +103,7 @@ static int __devinit clock_board_probe(struct of_device *op,
p->leds_resource.name = "leds"; p->leds_resource.name = "leds";
p->leds_pdev.name = "sunfire-clockboard-leds"; p->leds_pdev.name = "sunfire-clockboard-leds";
p->leds_pdev.id = -1;
p->leds_pdev.resource = &p->leds_resource; p->leds_pdev.resource = &p->leds_resource;
p->leds_pdev.num_resources = 1; p->leds_pdev.num_resources = 1;
p->leds_pdev.dev.parent = &op->dev; p->leds_pdev.dev.parent = &op->dev;
...@@ -197,6 +198,7 @@ static int __devinit fhc_probe(struct of_device *op, ...@@ -197,6 +198,7 @@ static int __devinit fhc_probe(struct of_device *op,
p->leds_resource.name = "leds"; p->leds_resource.name = "leds";
p->leds_pdev.name = "sunfire-fhc-leds"; p->leds_pdev.name = "sunfire-fhc-leds";
p->leds_pdev.id = p->board_num;
p->leds_pdev.resource = &p->leds_resource; p->leds_pdev.resource = &p->leds_resource;
p->leds_pdev.num_resources = 1; p->leds_pdev.num_resources = 1;
p->leds_pdev.dev.parent = &op->dev; p->leds_pdev.dev.parent = &op->dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment