diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-06-24 00:36:46 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-24 02:16:11 -0400 |
commit | 96399487ad84b0d935923fe3652943159f36fb64 (patch) | |
tree | 97e82724bb3473abbb7c5e47766260d6bd26df92 /drivers/net | |
parent | c0442209e41b3453736ef974ee709a6ae15d99fb (diff) |
[NET] sunhme: Kill useless loop over sdevs in quattro_sbus_find().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/sunhme.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index ec51f397e1ed..c33ead3470db 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2568,14 +2568,10 @@ static void __init quattro_apply_ranges(struct quattro *qp, struct happy_meal *h | |||
2568 | */ | 2568 | */ |
2569 | static struct quattro * __init quattro_sbus_find(struct sbus_dev *goal_sdev) | 2569 | static struct quattro * __init quattro_sbus_find(struct sbus_dev *goal_sdev) |
2570 | { | 2570 | { |
2571 | struct sbus_bus *sbus; | ||
2572 | struct sbus_dev *sdev; | 2571 | struct sbus_dev *sdev; |
2573 | struct quattro *qp; | 2572 | struct quattro *qp; |
2574 | int i; | 2573 | int i; |
2575 | 2574 | ||
2576 | if (qfe_sbus_list == NULL) | ||
2577 | goto found; | ||
2578 | |||
2579 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { | 2575 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { |
2580 | for (i = 0, sdev = qp->quattro_dev; | 2576 | for (i = 0, sdev = qp->quattro_dev; |
2581 | (sdev != NULL) && (i < 4); | 2577 | (sdev != NULL) && (i < 4); |
@@ -2584,17 +2580,7 @@ static struct quattro * __init quattro_sbus_find(struct sbus_dev *goal_sdev) | |||
2584 | return qp; | 2580 | return qp; |
2585 | } | 2581 | } |
2586 | } | 2582 | } |
2587 | for_each_sbus(sbus) { | ||
2588 | for_each_sbusdev(sdev, sbus) { | ||
2589 | if (sdev == goal_sdev) | ||
2590 | goto found; | ||
2591 | } | ||
2592 | } | ||
2593 | |||
2594 | /* Cannot find quattro parent, fail. */ | ||
2595 | return NULL; | ||
2596 | 2583 | ||
2597 | found: | ||
2598 | qp = kmalloc(sizeof(struct quattro), GFP_KERNEL); | 2584 | qp = kmalloc(sizeof(struct quattro), GFP_KERNEL); |
2599 | if (qp != NULL) { | 2585 | if (qp != NULL) { |
2600 | int i; | 2586 | int i; |