diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-04-02 19:56:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-02 22:04:50 -0400 |
commit | bf6aede712334d7338d5c47a5ee5ba3883c82a61 (patch) | |
tree | 153483c5ef1de41f8dd3d233ba46117d0676c303 /drivers/s390 | |
parent | e4c2ff1cf2d7fc65d0fc6f88bc98338e0212ad52 (diff) |
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.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Greg KH <greg@kroah.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index aab8123c5966..e8d032b9dfbd 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
@@ -94,7 +94,7 @@ static int zfcp_wka_port_get(struct zfcp_wka_port *wka_port) | |||
94 | 94 | ||
95 | static void zfcp_wka_port_offline(struct work_struct *work) | 95 | static void zfcp_wka_port_offline(struct work_struct *work) |
96 | { | 96 | { |
97 | struct delayed_work *dw = container_of(work, struct delayed_work, work); | 97 | struct delayed_work *dw = to_delayed_work(work); |
98 | struct zfcp_wka_port *wka_port = | 98 | struct zfcp_wka_port *wka_port = |
99 | container_of(dw, struct zfcp_wka_port, work); | 99 | container_of(dw, struct zfcp_wka_port, work); |
100 | 100 | ||