summaryrefslogtreecommitdiff
path: root/drivers/net/macb.c
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2006-12-08 14:37:35 +0100
committerJeff Garzik <jeff@garzik.org>2006-12-11 09:31:28 -0500
commitd836cae4f683211f14c1fd8184f478622b185164 (patch)
tree006f96c4099116b3b0e55311f8ff33915ec30932 /drivers/net/macb.c
parent68dc44af632944dff6c8b36013d32a254fe62de4 (diff)
[PATCH] MACB: Use struct delayed_work instead of struct work_struct
The macb driver calls schedule_delayed_work() and friends, so we need to use a struct delayed_work along with it. The conversion was explained by David Howells on lkml Dec 5 2006: http://lkml.org/lkml/2006/12/5/269 Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r--drivers/net/macb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index bd0ce98c939c..3496d19c55e1 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -267,9 +267,9 @@ static void macb_update_stats(struct macb *bp)
*p += readl(reg);
}
-static void macb_periodic_task(void *arg)
+static void macb_periodic_task(struct work_struct *work)
{
- struct macb *bp = arg;
+ struct macb *bp = container_of(work, struct macb, periodic_task.work);
macb_update_stats(bp);
macb_check_media(bp, 1, 0);
@@ -1088,7 +1088,7 @@ static int __devinit macb_probe(struct platform_device *pdev)
dev->base_addr = regs->start;
- INIT_WORK(&bp->periodic_task, macb_periodic_task, bp);
+ INIT_DELAYED_WORK(&bp->periodic_task, macb_periodic_task);
mutex_init(&bp->mdio_mutex);
init_completion(&bp->mdio_complete);