]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/isdn/i4l/isdn_net.h
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / isdn / i4l / isdn_net.h
index be4949715d55f605206f99e86430fe0c46ff1f1d..74032d0881efab82d80b93193a2ebfc372e9bd58 100644 (file)
@@ -56,6 +56,11 @@ extern void isdn_net_write_super(isdn_net_local *lp, struct sk_buff *skb);
 
 #define ISDN_NET_MAX_QUEUE_LENGTH 2
 
+#define ISDN_MASTER_PRIV(lp) ((isdn_net_local *) netdev_priv(lp->master))
+#define ISDN_SLAVE_PRIV(lp) ((isdn_net_local *) netdev_priv(lp->slave))
+#define MASTER_TO_SLAVE(master)        \
+                       (((isdn_net_local *) netdev_priv(master))->slave)
+
 /*
  * is this particular channel busy?
  */
@@ -126,7 +131,7 @@ static __inline__ void isdn_net_rm_from_bundle(isdn_net_local *lp)
        unsigned long flags;
 
        if (lp->master)
-               master_lp = (isdn_net_local *) lp->master->priv;
+               master_lp = ISDN_MASTER_PRIV(lp);
 
 //     printk(KERN_DEBUG "%s: lp:%s(%p) mlp:%s(%p) last(%p) next(%p) mndq(%p)\n",
 //             __func__, lp->name, lp, master_lp->name, master_lp, lp->last, lp->next, master_lp->netdev->queue);
@@ -145,46 +150,3 @@ static __inline__ void isdn_net_rm_from_bundle(isdn_net_local *lp)
        spin_unlock_irqrestore(&master_lp->netdev->queue_lock, flags);
 }
 
-static inline int
-put_u8(unsigned char *p, u8 x)
-{
-       *p = x;
-       return 1;
-}
-
-static inline int
-put_u16(unsigned char *p, u16 x)
-{
-       *((u16 *)p) = htons(x);
-       return 2;
-}
-
-static inline int
-put_u32(unsigned char *p, u32 x)
-{
-       *((u32 *)p) = htonl(x);
-       return 4;
-}
-
-static inline int
-get_u8(unsigned char *p, u8 *x)
-{
-       *x = *p;
-       return 1;
-}
-
-static inline int
-get_u16(unsigned char *p, u16 *x)
-{
-       *x = ntohs(*((u16 *)p));
-       return 2;
-}
-
-static inline int
-get_u32(unsigned char *p, u32 *x)
-{
-       *x = ntohl(*((u32 *)p));
-       return 4;
-}
-
-