summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAristeu Sergio Rozanski Filho <aris@cathedrallabs.org>2005-08-07 09:42:28 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-07 10:00:38 -0700
commit8b0ed2fbdbea3f0d34404f1cbfdf02c4a673ca56 (patch)
tree6bdc59e8f55e86862d71d650e023f6d766ab920c
parent68b47139ea94ab6d05e89c654db8daa99e9a232c (diff)
downloadlinux-3.10-8b0ed2fbdbea3f0d34404f1cbfdf02c4a673ca56.tar.gz
linux-3.10-8b0ed2fbdbea3f0d34404f1cbfdf02c4a673ca56.tar.bz2
linux-3.10-8b0ed2fbdbea3f0d34404f1cbfdf02c4a673ca56.zip
[PATCH] ppc32: 8xx: convert fec driver to use work_struct
8xx: convert fec driver to use work_struct Signed-off-by: Aristeu Sergio Rozanski Filho <aris@conectiva.com.br> Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/ppc/8xx_io/fec.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
index 0730392dcc2..33ff2976ce2 100644
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -173,7 +173,7 @@ struct fec_enet_private {
uint phy_status;
uint phy_speed;
phy_info_t *phy;
- struct tq_struct phy_task;
+ struct work_struct phy_task;
uint sequence_done;
@@ -1263,8 +1263,9 @@ static void mii_display_status(struct net_device *dev)
printk(".\n");
}
-static void mii_display_config(struct net_device *dev)
+static void mii_display_config(void *priv)
{
+ struct net_device *dev = (struct net_device *)priv;
struct fec_enet_private *fep = dev->priv;
volatile uint *s = &(fep->phy_status);
@@ -1294,8 +1295,9 @@ static void mii_display_config(struct net_device *dev)
fep->sequence_done = 1;
}
-static void mii_relink(struct net_device *dev)
+static void mii_relink(void *priv)
{
+ struct net_device *dev = (struct net_device *)priv;
struct fec_enet_private *fep = dev->priv;
int duplex;
@@ -1323,18 +1325,16 @@ static void mii_queue_relink(uint mii_reg, struct net_device *dev)
{
struct fec_enet_private *fep = dev->priv;
- fep->phy_task.routine = (void *)mii_relink;
- fep->phy_task.data = dev;
- schedule_task(&fep->phy_task);
+ INIT_WORK(&fep->phy_task, mii_relink, (void *)dev);
+ schedule_work(&fep->phy_task);
}
static void mii_queue_config(uint mii_reg, struct net_device *dev)
{
struct fec_enet_private *fep = dev->priv;
- fep->phy_task.routine = (void *)mii_display_config;
- fep->phy_task.data = dev;
- schedule_task(&fep->phy_task);
+ INIT_WORK(&fep->phy_task, mii_display_config, (void *)dev);
+ schedule_work(&fep->phy_task);
}