Commit 8b0ed2fb authored by Aristeu Sergio Rozanski Filho's avatar Aristeu Sergio Rozanski Filho Committed by Linus Torvalds

[PATCH] ppc32: 8xx: convert fec driver to use work_struct

8xx: convert fec driver to use work_struct
Signed-off-by: default avatarAristeu Sergio Rozanski Filho <aris@conectiva.com.br>
Signed-off-by: default avatarMarcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 68b47139
...@@ -173,7 +173,7 @@ struct fec_enet_private { ...@@ -173,7 +173,7 @@ struct fec_enet_private {
uint phy_status; uint phy_status;
uint phy_speed; uint phy_speed;
phy_info_t *phy; phy_info_t *phy;
struct tq_struct phy_task; struct work_struct phy_task;
uint sequence_done; uint sequence_done;
...@@ -1263,8 +1263,9 @@ static void mii_display_status(struct net_device *dev) ...@@ -1263,8 +1263,9 @@ static void mii_display_status(struct net_device *dev)
printk(".\n"); 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; struct fec_enet_private *fep = dev->priv;
volatile uint *s = &(fep->phy_status); volatile uint *s = &(fep->phy_status);
...@@ -1294,8 +1295,9 @@ static void mii_display_config(struct net_device *dev) ...@@ -1294,8 +1295,9 @@ static void mii_display_config(struct net_device *dev)
fep->sequence_done = 1; 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; struct fec_enet_private *fep = dev->priv;
int duplex; int duplex;
...@@ -1323,18 +1325,16 @@ static void mii_queue_relink(uint mii_reg, struct net_device *dev) ...@@ -1323,18 +1325,16 @@ static void mii_queue_relink(uint mii_reg, struct net_device *dev)
{ {
struct fec_enet_private *fep = dev->priv; struct fec_enet_private *fep = dev->priv;
fep->phy_task.routine = (void *)mii_relink; INIT_WORK(&fep->phy_task, mii_relink, (void *)dev);
fep->phy_task.data = dev; schedule_work(&fep->phy_task);
schedule_task(&fep->phy_task);
} }
static void mii_queue_config(uint mii_reg, struct net_device *dev) static void mii_queue_config(uint mii_reg, struct net_device *dev)
{ {
struct fec_enet_private *fep = dev->priv; struct fec_enet_private *fep = dev->priv;
fep->phy_task.routine = (void *)mii_display_config; INIT_WORK(&fep->phy_task, mii_display_config, (void *)dev);
fep->phy_task.data = dev; schedule_work(&fep->phy_task);
schedule_task(&fep->phy_task);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment