diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2006-12-08 08:37:35 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-11 09:31:28 -0500 |
commit | d836cae4f683211f14c1fd8184f478622b185164 (patch) | |
tree | 006f96c4099116b3b0e55311f8ff33915ec30932 /drivers/net | |
parent | 68dc44af632944dff6c8b36013d32a254fe62de4 (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')
-rw-r--r-- | drivers/net/macb.c | 6 | ||||
-rw-r--r-- | drivers/net/macb.h | 2 |
2 files changed, 4 insertions, 4 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) | |||
267 | *p += readl(reg); | 267 | *p += readl(reg); |
268 | } | 268 | } |
269 | 269 | ||
270 | static void macb_periodic_task(void *arg) | 270 | static void macb_periodic_task(struct work_struct *work) |
271 | { | 271 | { |
272 | struct macb *bp = arg; | 272 | struct macb *bp = container_of(work, struct macb, periodic_task.work); |
273 | 273 | ||
274 | macb_update_stats(bp); | 274 | macb_update_stats(bp); |
275 | macb_check_media(bp, 1, 0); | 275 | macb_check_media(bp, 1, 0); |
@@ -1088,7 +1088,7 @@ static int __devinit macb_probe(struct platform_device *pdev) | |||
1088 | 1088 | ||
1089 | dev->base_addr = regs->start; | 1089 | dev->base_addr = regs->start; |
1090 | 1090 | ||
1091 | INIT_WORK(&bp->periodic_task, macb_periodic_task, bp); | 1091 | INIT_DELAYED_WORK(&bp->periodic_task, macb_periodic_task); |
1092 | mutex_init(&bp->mdio_mutex); | 1092 | mutex_init(&bp->mdio_mutex); |
1093 | init_completion(&bp->mdio_complete); | 1093 | init_completion(&bp->mdio_complete); |
1094 | 1094 | ||
diff --git a/drivers/net/macb.h b/drivers/net/macb.h index 8c253db69881..e3fcb2e06fdc 100644 --- a/drivers/net/macb.h +++ b/drivers/net/macb.h | |||
@@ -377,7 +377,7 @@ struct macb { | |||
377 | 377 | ||
378 | unsigned int rx_pending, tx_pending; | 378 | unsigned int rx_pending, tx_pending; |
379 | 379 | ||
380 | struct work_struct periodic_task; | 380 | struct delayed_work periodic_task; |
381 | 381 | ||
382 | struct mutex mdio_mutex; | 382 | struct mutex mdio_mutex; |
383 | struct completion mdio_complete; | 383 | struct completion mdio_complete; |