Skip to content

Commit

Permalink
sparc64: Initialize FHC/CLOCK LED platform_device 'id' field correctly.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Jan 19, 2009
1 parent 62dfcd3 commit b7c18c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/sparc/kernel/central.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ static int __devinit clock_board_probe(struct of_device *op,
p->leds_resource.name = "leds";

p->leds_pdev.name = "sunfire-clockboard-leds";
p->leds_pdev.id = -1;
p->leds_pdev.resource = &p->leds_resource;
p->leds_pdev.num_resources = 1;
p->leds_pdev.dev.parent = &op->dev;
Expand Down Expand Up @@ -197,6 +198,7 @@ static int __devinit fhc_probe(struct of_device *op,
p->leds_resource.name = "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.num_resources = 1;
p->leds_pdev.dev.parent = &op->dev;
Expand Down

0 comments on commit b7c18c1

Please sign in to comment.