aboutsummaryrefslogtreecommitdiff
path: root/drivers/isdn/i4l/isdn_net.h
diff options
context:
space:
mode:
authormerge <null@invalid>2009-01-22 13:55:32 +0000
committerAndy Green <agreen@octopus.localdomain>2009-01-22 13:55:32 +0000
commitaa6f5ffbdba45aa8e19e5048648fc6c7b25376d3 (patch)
treefbb786d0ac6f8a774fd834e9ce951197e60fbffa /drivers/isdn/i4l/isdn_net.h
parentf2d78193eae5dccd3d588d2c8ea0866efc368332 (diff)
MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141
pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141 / fdf777a63bcb59e0dfd78bfe2c6242e01f6d4eb9 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 stable-tracking-hist top was MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 / 90463bfd2d5a3c8b52f6e6d71024a00e052b0ced ... parent commitmessage: From: merge <null@invalid> MERGE-via-mokopatches-tracking-hist-fix-stray-endmenu-patch mokopatches-tracking-hist top was fix-stray-endmenu-patch / 3630e0be570de8057e7f8d2fe501ed353cdf34e6 ... parent commitmessage: From: Andy Green <andy@openmoko.com> fix-stray-endmenu.patch Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/isdn/i4l/isdn_net.h')
-rw-r--r--drivers/isdn/i4l/isdn_net.h50
1 files changed, 6 insertions, 44 deletions
diff --git a/drivers/isdn/i4l/isdn_net.h b/drivers/isdn/i4l/isdn_net.h
index be4949715d5..74032d0881e 100644
--- a/drivers/isdn/i4l/isdn_net.h
+++ b/drivers/isdn/i4l/isdn_net.h
@@ -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;
-}
-
-