diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-04-05 22:27:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-06 20:07:59 -0400 |
commit | 10fd9d7ec48194754de6497ded2ef53cbd2c313e (patch) | |
tree | 4bf147d16636b5984cb694f2d6a5ea26a9f688c3 /drivers | |
parent | c69c6d107ab18e330f22f9380da353fed29c296b (diff) |
ibm_newemac: Fix dangerous struct assumption
The ibm_newemac driver includes code which assumes that the
work_struct which is included in every delayed_work is the first
member of that structure. This is currently the case but might change
in the future, so use to_delayed_work() instead, which doesn't make
such an assumption.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ibm_newemac/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index a815e17a0ab4..77e4b5b52fc8 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -1229,7 +1229,7 @@ static int emac_link_differs(struct emac_instance *dev) | |||
1229 | static void emac_link_timer(struct work_struct *work) | 1229 | static void emac_link_timer(struct work_struct *work) |
1230 | { | 1230 | { |
1231 | struct emac_instance *dev = | 1231 | struct emac_instance *dev = |
1232 | container_of((struct delayed_work *)work, | 1232 | container_of(to_delayed_work(work), |
1233 | struct emac_instance, link_work); | 1233 | struct emac_instance, link_work); |
1234 | int link_poll_interval; | 1234 | int link_poll_interval; |
1235 | 1235 | ||