aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorDale Farnsworth <dale@farnsworth.org>2007-03-03 08:40:28 -0500
committerJeff Garzik <jeff@garzik.org>2007-03-06 06:14:54 -0500
commit84dd619e4dc3b0b1c40dafd98c90fd950bce7bc5 (patch)
tree939d601f7abda95e3f4919af2a371873f0c66928 /arch/ppc
parentb2cbbd8e0e8093fbf115ac2669482b016d781c78 (diff)
mv643xx_eth: Place explicit port number in mv643xx_eth_platform_data
We were using the platform_device.id field to identify which ethernet port is used for mv643xx_eth device. This is not generally correct. It will be incorrect, for example, if a hardware platform uses a single port but not the first port. Here, we add an explicit port_number field to struct mv643xx_eth_platform_data. This makes the mv643xx_eth_platform_data structure required, but that isn't an issue since all users currently provide it already. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/syslib/mv64x60.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c
index 3b039c30a43..a6f8b686ea8 100644
--- a/arch/ppc/syslib/mv64x60.c
+++ b/arch/ppc/syslib/mv64x60.c
@@ -339,7 +339,9 @@ static struct resource mv64x60_eth0_resources[] = {
339 }, 339 },
340}; 340};
341 341
342static struct mv643xx_eth_platform_data eth0_pd; 342static struct mv643xx_eth_platform_data eth0_pd = {
343 .port_number = 0,
344};
343 345
344static struct platform_device eth0_device = { 346static struct platform_device eth0_device = {
345 .name = MV643XX_ETH_NAME, 347 .name = MV643XX_ETH_NAME,
@@ -362,7 +364,9 @@ static struct resource mv64x60_eth1_resources[] = {
362 }, 364 },
363}; 365};
364 366
365static struct mv643xx_eth_platform_data eth1_pd; 367static struct mv643xx_eth_platform_data eth1_pd = {
368 .port_number = 1,
369};
366 370
367static struct platform_device eth1_device = { 371static struct platform_device eth1_device = {
368 .name = MV643XX_ETH_NAME, 372 .name = MV643XX_ETH_NAME,
@@ -385,7 +389,9 @@ static struct resource mv64x60_eth2_resources[] = {
385 }, 389 },
386}; 390};
387 391
388static struct mv643xx_eth_platform_data eth2_pd; 392static struct mv643xx_eth_platform_data eth2_pd = {
393 .port_number = 2,
394};
389 395
390static struct platform_device eth2_device = { 396static struct platform_device eth2_device = {
391 .name = MV643XX_ETH_NAME, 397 .name = MV643XX_ETH_NAME,