summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2003-09-20 05:55:21 -0400
committerStephen Hemminger <shemminger@osdl.org>2003-09-20 05:55:21 -0400
commit70f5897bb7581eb14491900a1da90c6dad148754 (patch)
tree35dbf29ca9606a71473c7d8aade1fe858079a8ab /include/net
parente1153a5bd3fd2c8e0f00a520ea0cc64a8bd377ef (diff)
[PATCH] replace sppp_of macro with inline
Replace macro with inline and get some type checking.
Diffstat (limited to 'include/net')
-rw-r--r--include/net/syncppp.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/net/syncppp.h b/include/net/syncppp.h
index 07214226b4e3..f2032606419e 100644
--- a/include/net/syncppp.h
+++ b/include/net/syncppp.h
@@ -57,8 +57,11 @@ struct ppp_device
struct sppp sppp; /* Synchronous PPP */
};
-#define sppp_of(dev) \
- (&((struct ppp_device *)(*(unsigned long *)((dev)->priv)))->sppp)
+static inline struct sppp *sppp_of(struct net_device *dev)
+{
+ struct ppp_device *ppp = dev->priv;
+ return &ppp->sppp;
+}
#define PP_KEEPALIVE 0x01 /* use keepalive protocol */
#define PP_CISCO 0x02 /* use Cisco protocol instead of PPP */