diff options
Diffstat (limited to 'drivers/net/ppp_generic.c')
-rw-r--r-- | drivers/net/ppp_generic.c | 2 |
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) |