aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/8xx_io/fec.c
diff options
context:
space:
mode:
authorAristeu Sergio Rozanski Filho <aris@cathedrallabs.org>2005-08-07 12:42:28 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-07 13:00:38 -0400
commit8b0ed2fbdbea3f0d34404f1cbfdf02c4a673ca56 (patch)
tree6bdc59e8f55e86862d71d650e023f6d766ab920c /arch/ppc/8xx_io/fec.c
parent68b47139ea94ab6d05e89c654db8daa99e9a232c (diff)
[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>
Diffstat (limited to 'arch/ppc/8xx_io/fec.c')
-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 0730392dcc20..33ff2976ce25 100644
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -173,7 +173,7 @@ struct fec_enet_private {
173 uint phy_status; 173 uint phy_status;
174 uint phy_speed; 174 uint phy_speed;
175 phy_info_t *phy; 175 phy_info_t *phy;
176 struct tq_struct phy_task; 176 struct work_struct phy_task;
177 177
178 uint sequence_done; 178 uint sequence_done;
179 179
@@ -1263,8 +1263,9 @@ static void mii_display_status(struct net_device *dev)
1263 printk(".\n"); 1263 printk(".\n");
1264} 1264}
1265 1265
1266static void mii_display_config(struct net_device *dev) 1266static void mii_display_config(void *priv)
1267{ 1267{
1268 struct net_device *dev = (struct net_device *)priv;
1268 struct fec_enet_private *fep = dev->priv; 1269 struct fec_enet_private *fep = dev->priv;
1269 volatile uint *s = &(fep->phy_status); 1270 volatile uint *s = &(fep->phy_status);
1270 1271
@@ -1294,8 +1295,9 @@ static void mii_display_config(struct net_device *dev)
1294 fep->sequence_done = 1; 1295 fep->sequence_done = 1;
1295} 1296}
1296 1297
1297static void mii_relink(struct net_device *dev) 1298static void mii_relink(void *priv)
1298{ 1299{
1300 struct net_device *dev = (struct net_device *)priv;
1299 struct fec_enet_private *fep = dev->priv; 1301 struct fec_enet_private *fep = dev->priv;
1300 int duplex; 1302 int duplex;
1301 1303
@@ -1323,18 +1325,16 @@ static void mii_queue_relink(uint mii_reg, struct net_device *dev)
1323{ 1325{
1324 struct fec_enet_private *fep = dev->priv; 1326 struct fec_enet_private *fep = dev->priv;
1325 1327
1326 fep->phy_task.routine = (void *)mii_relink; 1328 INIT_WORK(&fep->phy_task, mii_relink, (void *)dev);
1327 fep->phy_task.data = dev; 1329 schedule_work(&fep->phy_task);
1328 schedule_task(&fep->phy_task);
1329} 1330}
1330 1331
1331static void mii_queue_config(uint mii_reg, struct net_device *dev) 1332static void mii_queue_config(uint mii_reg, struct net_device *dev)
1332{ 1333{
1333 struct fec_enet_private *fep = dev->priv; 1334 struct fec_enet_private *fep = dev->priv;
1334 1335
1335 fep->phy_task.routine = (void *)mii_display_config; 1336 INIT_WORK(&fep->phy_task, mii_display_config, (void *)dev);
1336 fep->phy_task.data = dev; 1337 schedule_work(&fep->phy_task);
1337 schedule_task(&fep->phy_task);
1338} 1338}
1339 1339
1340 1340