diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 14:36:26 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 14:36:26 -0500 |
commit | 6d5aefb8eaa38e44b5b8cf60c812aceafc02d924 (patch) | |
tree | 8945fd66a5f8a32f4daecf9799635ec5d7f86348 /arch/ppc/8260_io | |
parent | 9db73724453a9350e1c22dbe732d427e2939a5c9 (diff) |
WorkQueue: Fix up arch-specific work items where possible
Fix up arch-specific work items where possible to use the new work_struct and
delayed_work structs.
Three places that enqueue bits of their stack and then return have been marked
with #error as this is not permitted.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/ppc/8260_io')
-rw-r--r-- | arch/ppc/8260_io/fcc_enet.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c index 2e1943e27819..709952c25f29 100644 --- a/arch/ppc/8260_io/fcc_enet.c +++ b/arch/ppc/8260_io/fcc_enet.c | |||
@@ -385,6 +385,7 @@ struct fcc_enet_private { | |||
385 | phy_info_t *phy; | 385 | phy_info_t *phy; |
386 | struct work_struct phy_relink; | 386 | struct work_struct phy_relink; |
387 | struct work_struct phy_display_config; | 387 | struct work_struct phy_display_config; |
388 | struct net_device *dev; | ||
388 | 389 | ||
389 | uint sequence_done; | 390 | uint sequence_done; |
390 | 391 | ||
@@ -1391,10 +1392,11 @@ static phy_info_t *phy_info[] = { | |||
1391 | NULL | 1392 | NULL |
1392 | }; | 1393 | }; |
1393 | 1394 | ||
1394 | static void mii_display_status(void *data) | 1395 | static void mii_display_status(struct work_struct *work) |
1395 | { | 1396 | { |
1396 | struct net_device *dev = data; | 1397 | volatile struct fcc_enet_private *fep = |
1397 | volatile struct fcc_enet_private *fep = dev->priv; | 1398 | container_of(work, struct fcc_enet_private, phy_relink); |
1399 | struct net_device *dev = fep->dev; | ||
1398 | uint s = fep->phy_status; | 1400 | uint s = fep->phy_status; |
1399 | 1401 | ||
1400 | if (!fep->link && !fep->old_link) { | 1402 | if (!fep->link && !fep->old_link) { |
@@ -1428,10 +1430,12 @@ static void mii_display_status(void *data) | |||
1428 | printk(".\n"); | 1430 | printk(".\n"); |
1429 | } | 1431 | } |
1430 | 1432 | ||
1431 | static void mii_display_config(void *data) | 1433 | static void mii_display_config(struct work_struct *work) |
1432 | { | 1434 | { |
1433 | struct net_device *dev = data; | 1435 | volatile struct fcc_enet_private *fep = |
1434 | volatile struct fcc_enet_private *fep = dev->priv; | 1436 | container_of(work, struct fcc_enet_private, |
1437 | phy_display_config); | ||
1438 | struct net_device *dev = fep->dev; | ||
1435 | uint s = fep->phy_status; | 1439 | uint s = fep->phy_status; |
1436 | 1440 | ||
1437 | printk("%s: config: auto-negotiation ", dev->name); | 1441 | printk("%s: config: auto-negotiation ", dev->name); |
@@ -1758,8 +1762,9 @@ static int __init fec_enet_init(void) | |||
1758 | cep->phy_id_done = 0; | 1762 | cep->phy_id_done = 0; |
1759 | cep->phy_addr = fip->fc_phyaddr; | 1763 | cep->phy_addr = fip->fc_phyaddr; |
1760 | mii_queue(dev, mk_mii_read(MII_PHYSID1), mii_discover_phy); | 1764 | mii_queue(dev, mk_mii_read(MII_PHYSID1), mii_discover_phy); |
1761 | INIT_WORK(&cep->phy_relink, mii_display_status, dev); | 1765 | INIT_WORK(&cep->phy_relink, mii_display_status); |
1762 | INIT_WORK(&cep->phy_display_config, mii_display_config, dev); | 1766 | INIT_WORK(&cep->phy_display_config, mii_display_config); |
1767 | cep->dev = dev; | ||
1763 | #endif /* CONFIG_USE_MDIO */ | 1768 | #endif /* CONFIG_USE_MDIO */ |
1764 | 1769 | ||
1765 | fip++; | 1770 | fip++; |