powerpc/chrp: Store the intended structure
authorJulia Lawall <julia.lawall@lip6.fr>
Sun, 13 Aug 2017 13:24:23 +0000 (15:24 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 15 Aug 2017 11:13:13 +0000 (21:13 +1000)
Normally the values in the resource field and the argument to ARRAY_SIZE
in the num_resources are the same.  In this case, the value in the reousrce
field is the same as the one in the previous platform_device structure, and
appears to be a copy-paste error.  Replace the value in the resource field
with the argument to the local call to ARRAY_SIZE.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/chrp/pegasos_eth.c

index 2b4dc6abde6ce30a3dda84bbc94ed91b2434f36f..19760712b39da3e1f3063c3046814a47e4ba3073 100644 (file)
@@ -63,7 +63,7 @@ static struct platform_device mv643xx_eth_mvmdio_device = {
        .name           = "orion-mdio",
        .id             = -1,
        .num_resources  = ARRAY_SIZE(mv643xx_eth_mvmdio_resources),
-       .resource       = mv643xx_eth_shared_resources,
+       .resource       = mv643xx_eth_mvmdio_resources,
 };
 
 static struct resource mv643xx_eth_port1_resources[] = {