diff options
author | Tilman Schmidt <tilman@imap.cc> | 2006-04-10 22:55:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 06:18:49 -0700 |
commit | d48c77841a71ba552ef4e6a862642073652f4473 (patch) | |
tree | 98e76d8bd9962eba7f5897e9d24acacc88b4e1f6 /drivers/isdn/gigaset/usb-gigaset.c | |
parent | b1d47464c947f08125dc4ac4a2321ced9e2fed29 (diff) | |
download | talos-op-linux-d48c77841a71ba552ef4e6a862642073652f4473.tar.gz talos-op-linux-d48c77841a71ba552ef4e6a862642073652f4473.zip |
[PATCH] isdn4linux: Siemens Gigaset drivers: remove IFNULL macros
With Hansjoerg Lipp <hjlipp@web.de>
Remove the IFNULL debugging macros from the Gigaset drivers.
Signed-off-by: Hansjoerg Lipp <hjlipp@web.de>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/gigaset/usb-gigaset.c')
-rw-r--r-- | drivers/isdn/gigaset/usb-gigaset.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index a977dd570751..e1a3eeb3c21a 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c @@ -365,18 +365,12 @@ static void gigaset_modem_fill(unsigned long data) */ static void gigaset_read_int_callback(struct urb *urb, struct pt_regs *regs) { + struct inbuf_t *inbuf = urb->context; + struct cardstate *cs = inbuf->cs; int resubmit = 0; int r; - struct cardstate *cs; unsigned numbytes; unsigned char *src; - struct inbuf_t *inbuf; - - IFNULLRET(urb); - inbuf = (struct inbuf_t *) urb->context; - IFNULLRET(inbuf); - cs = inbuf->cs; - IFNULLRET(cs); if (!atomic_read(&cs->connected)) { err("%s: disconnected", __func__); @@ -421,9 +415,8 @@ static void gigaset_read_int_callback(struct urb *urb, struct pt_regs *regs) /* This callback routine is called when data was transmitted to the device. */ static void gigaset_write_bulk_callback(struct urb *urb, struct pt_regs *regs) { - struct cardstate *cs = (struct cardstate *) urb->context; + struct cardstate *cs = urb->context; - IFNULLRET(cs); #ifdef CONFIG_GIGASET_DEBUG if (!atomic_read(&cs->connected)) { err("%s: not connected", __func__); @@ -632,20 +625,13 @@ static int gigaset_initcshw(struct cardstate *cs) /* Send data from current skb to the device. */ static int write_modem(struct cardstate *cs) { - int ret; + int ret = 0; int count; struct bc_state *bcs = &cs->bcs[0]; /* only one channel */ struct usb_cardstate *ucs = cs->hw.usb; - IFNULLRETVAL(bcs->tx_skb, -EINVAL); - gig_dbg(DEBUG_WRITE, "len: %d...", bcs->tx_skb->len); - ret = -ENODEV; - IFNULLGOTO(ucs->bulk_out_buffer, error); - IFNULLGOTO(ucs->bulk_out_urb, error); - ret = 0; - if (!bcs->tx_skb->len) { dev_kfree_skb_any(bcs->tx_skb); bcs->tx_skb = NULL; @@ -683,11 +669,6 @@ static int write_modem(struct cardstate *cs) } return ret; -error: - dev_kfree_skb_any(bcs->tx_skb); - bcs->tx_skb = NULL; - return ret; - } static int gigaset_probe(struct usb_interface *interface, |