diff options
| author | Jean Delvare <[email protected]> | 2009-04-02 23:56:54 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-04-03 02:04:50 +0000 |
| commit | bf6aede712334d7338d5c47a5ee5ba3883c82a61 (patch) | |
| tree | 153483c5ef1de41f8dd3d233ba46117d0676c303 /drivers/net/phy/phy.c | |
| parent | uml: fix warnings in kernel_execve (diff) | |
| download | kernel-bf6aede712334d7338d5c47a5ee5ba3883c82a61.tar.gz kernel-bf6aede712334d7338d5c47a5ee5ba3883c82a61.zip | |
workqueue: add to_delayed_work() helper function
It is a fairly common operation to have a pointer to a work and to need a
pointer to the delayed work it is contained in. In particular, all
delayed works which want to rearm themselves will have to do that. So it
would seem fair to offer a helper function for this operation.
[[email protected]: coding-style fixes]
Signed-off-by: Jean Delvare <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Pekka Enberg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/net/phy/phy.c')
| -rw-r--r-- | drivers/net/phy/phy.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 58b73b08dde0..3ff1f425f1bb 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -757,8 +757,7 @@ EXPORT_SYMBOL(phy_start); */ static void phy_state_machine(struct work_struct *work) { - struct delayed_work *dwork = - container_of(work, struct delayed_work, work); + struct delayed_work *dwork = to_delayed_work(work); struct phy_device *phydev = container_of(dwork, struct phy_device, state_queue); int needs_aneg = 0; |
