aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp_generic.c
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@mindspring.com>2007-02-10 04:46:25 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:18:06 -0500
commitb385a144ee790f00e8559bcb8024d042863f9be1 (patch)
treec2f2df78805fe8eff006716cee7b8fa8010d3b62 /drivers/net/ppp_generic.c
parent521dae191e5ba9362152da9fd3a12203e087df83 (diff)
[PATCH] Replace regular code with appropriate calls to container_of()
Replace a small number of expressions with a call to the "container_of()" macro. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Acked-by: Paul Mackerras <paulus@samba.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: James Morris <jmorris@namei.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/ppp_generic.c')
-rw-r--r--drivers/net/ppp_generic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index c6de566188e4..0986f6c843e6 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -83,7 +83,7 @@ struct ppp_file {
83 int dead; /* unit/channel has been shut down */ 83 int dead; /* unit/channel has been shut down */
84}; 84};
85 85
86#define PF_TO_X(pf, X) ((X *)((char *)(pf) - offsetof(X, file))) 86#define PF_TO_X(pf, X) container_of(pf, X, file)
87 87
88#define PF_TO_PPP(pf) PF_TO_X(pf, struct ppp) 88#define PF_TO_PPP(pf) PF_TO_X(pf, struct ppp)
89#define PF_TO_CHANNEL(pf) PF_TO_X(pf, struct channel) 89#define PF_TO_CHANNEL(pf) PF_TO_X(pf, struct channel)