diff options
Diffstat (limited to 'drivers/isdn/gigaset')
-rw-r--r-- | drivers/isdn/gigaset/asyncdata.c | 18 | ||||
-rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 13 | ||||
-rw-r--r-- | drivers/isdn/gigaset/common.c | 21 | ||||
-rw-r--r-- | drivers/isdn/gigaset/ev-layer.c | 42 | ||||
-rw-r--r-- | drivers/isdn/gigaset/gigaset.h | 20 | ||||
-rw-r--r-- | drivers/isdn/gigaset/i4l.c | 4 | ||||
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 52 | ||||
-rw-r--r-- | drivers/isdn/gigaset/isocdata.c | 6 | ||||
-rw-r--r-- | drivers/isdn/gigaset/ser-gigaset.c | 32 | ||||
-rw-r--r-- | drivers/isdn/gigaset/usb-gigaset.c | 14 |
10 files changed, 57 insertions, 165 deletions
diff --git a/drivers/isdn/gigaset/asyncdata.c b/drivers/isdn/gigaset/asyncdata.c index c2bd97d..2a4ce96 100644 --- a/drivers/isdn/gigaset/asyncdata.c +++ b/drivers/isdn/gigaset/asyncdata.c @@ -17,8 +17,6 @@ #include <linux/crc-ccitt.h> #include <linux/bitrev.h> -//#define GIG_M10x_STUFF_VOICE_DATA - /* check if byte must be stuffed/escaped * I'm not sure which data should be encoded. * Therefore I will go the hard way and decode every value @@ -147,19 +145,17 @@ static inline int hdlc_loop(unsigned char c, unsigned char *src, int numbytes, } byte_stuff: c ^= PPP_TRANS; -#ifdef CONFIG_GIGASET_DEBUG if (unlikely(!muststuff(c))) gig_dbg(DEBUG_HDLC, "byte stuffed: 0x%02x", c); -#endif } else if (unlikely(c == PPP_FLAG)) { if (unlikely(inputstate & INS_skip_frame)) { - if (!(inputstate & INS_have_data)) { /* 7E 7E */ #ifdef CONFIG_GIGASET_DEBUG + if (!(inputstate & INS_have_data)) { /* 7E 7E */ ++bcs->emptycount; -#endif } else gig_dbg(DEBUG_HDLC, "7e----------------------------"); +#endif /* end of frame */ error = 1; @@ -226,11 +222,9 @@ byte_stuff: } break; -#ifdef CONFIG_GIGASET_DEBUG } else if (unlikely(muststuff(c))) { /* Should not happen. Possible after ZDLE=1<CR><LF>. */ gig_dbg(DEBUG_HDLC, "not byte stuffed: 0x%02x", c); -#endif } /* add character */ @@ -394,20 +388,16 @@ void gigaset_m10x_input(struct inbuf_t *inbuf) inbuf->inputstate &= ~INS_DLE_char; switch (c) { case 'X': /*begin of command*/ -#ifdef CONFIG_GIGASET_DEBUG if (inbuf->inputstate & INS_command) - dev_err(cs->dev, + dev_warn(cs->dev, "received <DLE> 'X' in command mode\n"); -#endif inbuf->inputstate |= INS_command | INS_DLE_command; break; case '.': /*end of command*/ -#ifdef CONFIG_GIGASET_DEBUG if (!(inbuf->inputstate & INS_command)) - dev_err(cs->dev, + dev_warn(cs->dev, "received <DLE> '.' in hdlc mode\n"); -#endif inbuf->inputstate &= cs->dle ? ~(INS_DLE_command|INS_command) : ~INS_DLE_command; diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 3f11910..18dd8aa 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c @@ -2067,7 +2067,7 @@ static int gigaset_initbcshw(struct bc_state *bcs) bcs->hw.bas = ubc = kmalloc(sizeof(struct bas_bc_state), GFP_KERNEL); if (!ubc) { - err("could not allocate bas_bc_state"); + pr_err("out of memory\n"); return 0; } @@ -2081,7 +2081,7 @@ static int gigaset_initbcshw(struct bc_state *bcs) ubc->isooutdone = ubc->isooutfree = ubc->isooutovfl = NULL; ubc->numsub = 0; if (!(ubc->isooutbuf = kmalloc(sizeof(struct isowbuf_t), GFP_KERNEL))) { - err("could not allocate isochronous output buffer"); + pr_err("out of memory\n"); kfree(ubc); bcs->hw.bas = NULL; return 0; @@ -2136,8 +2136,10 @@ static int gigaset_initcshw(struct cardstate *cs) struct bas_cardstate *ucs; cs->hw.bas = ucs = kmalloc(sizeof *ucs, GFP_KERNEL); - if (!ucs) + if (!ucs) { + pr_err("out of memory\n"); return 0; + } ucs->urb_cmd_in = NULL; ucs->urb_cmd_out = NULL; @@ -2503,12 +2505,11 @@ static int __init bas_gigaset_init(void) /* register this driver with the USB subsystem */ result = usb_register(&gigaset_usb_driver); if (result < 0) { - err("usb_register failed (error %d)", -result); + pr_err("error %d registering USB driver\n", -result); goto error; } - info(DRIVER_AUTHOR); - info(DRIVER_DESC); + pr_info(DRIVER_DESC "\n"); return 0; error: diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index 9d3ce77..0048ce9 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c @@ -580,7 +580,7 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs, } else if ((bcs->skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN)) != NULL) skb_reserve(bcs->skb, HW_HDR_LEN); else { - warn("could not allocate skb"); + pr_err("out of memory\n"); bcs->inputstate |= INS_skip_frame; } @@ -634,20 +634,20 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, gig_dbg(DEBUG_INIT, "allocating cs"); if (!(cs = alloc_cs(drv))) { - err("maximum number of devices exceeded"); + pr_err("maximum number of devices exceeded\n"); return NULL; } gig_dbg(DEBUG_INIT, "allocating bcs[0..%d]", channels - 1); cs->bcs = kmalloc(channels * sizeof(struct bc_state), GFP_KERNEL); if (!cs->bcs) { - err("out of memory"); + pr_err("out of memory\n"); goto error; } gig_dbg(DEBUG_INIT, "allocating inbuf"); cs->inbuf = kmalloc(sizeof(struct inbuf_t), GFP_KERNEL); if (!cs->inbuf) { - err("out of memory"); + pr_err("out of memory\n"); goto error; } @@ -690,7 +690,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, for (i = 0; i < channels; ++i) { gig_dbg(DEBUG_INIT, "setting up bcs[%d].read", i); if (!gigaset_initbcs(cs->bcs + i, cs, i)) { - err("could not allocate channel %d data", i); + pr_err("could not allocate channel %d data\n", i); goto error; } } @@ -720,17 +720,15 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, gig_dbg(DEBUG_INIT, "setting up iif"); if (!gigaset_register_to_LL(cs, modulename)) { - err("register_isdn failed"); + pr_err("error registering ISDN device\n"); goto error; } make_valid(cs, VALID_ID); ++cs->cs_init; gig_dbg(DEBUG_INIT, "setting up hw"); - if (!cs->ops->initcshw(cs)) { - err("could not allocate device specific data"); + if (!cs->ops->initcshw(cs)) goto error; - } ++cs->cs_init; @@ -836,7 +834,7 @@ static void cleanup_cs(struct cardstate *cs) for (i = 0; i < cs->channels; ++i) { gigaset_freebcs(cs->bcs + i); if (!gigaset_initbcs(cs->bcs + i, cs, i)) - break; //FIXME error handling + pr_err("could not allocate channel %d data\n", i); } if (cs->waiting) { @@ -1120,8 +1118,7 @@ static int __init gigaset_init_module(void) if (gigaset_debuglevel == 1) gigaset_debuglevel = DEBUG_DEFAULT; - info(DRIVER_AUTHOR); - info(DRIVER_DESC); + pr_info(DRIVER_DESC "\n"); return 0; } diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index 5cbf64d8..e582a48 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c @@ -203,15 +203,6 @@ struct reply_t gigaset_tab_nocid_m10x[]= /* with dle mode */ {EV_TIMEOUT, 120,121, -1, 0, 0, {ACT_FAILVER, ACT_INIT}}, {RSP_ERROR, 120,121, -1, 0, 0, {ACT_FAILVER, ACT_INIT}}, {RSP_OK, 121,121, -1, 0, 0, {ACT_GOTVER, ACT_INIT}}, -#if 0 - {EV_TIMEOUT, 120,121, -1, 130, 5, {ACT_FAILVER}, "^SGCI=1\r"}, - {RSP_ERROR, 120,121, -1, 130, 5, {ACT_FAILVER}, "^SGCI=1\r"}, - {RSP_OK, 121,121, -1, 130, 5, {ACT_GOTVER}, "^SGCI=1\r"}, - - {RSP_OK, 130,130, -1, 0, 0, {ACT_INIT}}, - {RSP_ERROR, 130,130, -1, 0, 0, {ACT_FAILINIT}}, - {EV_TIMEOUT, 130,130, -1, 0, 0, {ACT_FAILINIT}}, -#endif /* leave dle mode */ {RSP_INIT, 0, 0,SEQ_DLE0, 201, 5, {0}, "^SDLE=0\r"}, @@ -260,10 +251,6 @@ struct reply_t gigaset_tab_nocid_m10x[]= /* with dle mode */ {RSP_INIT, 0, 0,SEQ_NOCID, 0, 0, {ACT_ABORTCID}}, /* reset */ -#if 0 - {RSP_INIT, 0, 0,SEQ_SHUTDOWN, 503, 5, {0}, "^SGCI=0\r"}, - {RSP_OK, 503,503, -1, 504, 5, {0}, "Z\r"}, -#endif {RSP_INIT, 0, 0,SEQ_SHUTDOWN, 504, 5, {0}, "Z\r"}, {RSP_OK, 504,504, -1, 0, 0, {ACT_SDOWN}}, {RSP_ERROR, 501,599, -1, 0, 0, {ACT_FAILSDOWN}}, @@ -391,24 +378,6 @@ struct reply_t gigaset_tab_cid_m10x[] = /* for M10x */ }; -#if 0 -static struct reply_t tab_nocid[]= /* no dle mode */ //FIXME -{ - /* resp_code, min_ConState, max_ConState, parameter, new_ConState, timeout, action, command */ - - {RSP_ANY, -1, -1, -1, -1,-1, ACT_WARN, NULL}, - {RSP_LAST,0,0,0,0,0,0} -}; - -static struct reply_t tab_cid[] = /* no dle mode */ //FIXME -{ - /* resp_code, min_ConState, max_ConState, parameter, new_ConState, timeout, action, command */ - - {RSP_ANY, -1, -1, -1, -1,-1, ACT_WARN, NULL}, - {RSP_LAST,0,0,0,0,0,0} -}; -#endif - static const struct resp_type_t resp_type[] = { /*{"", RSP_EMPTY, RT_NOTHING},*/ @@ -665,13 +634,8 @@ void gigaset_handle_modem_response(struct cardstate *cs) dev_err(cs->dev, "out of memory\n"); ++curarg; } -#ifdef CONFIG_GIGASET_DEBUG - if (!event->ptr) - gig_dbg(DEBUG_CMD, "string==NULL"); - else - gig_dbg(DEBUG_CMD, "string==%s", - (char *) event->ptr); -#endif + gig_dbg(DEBUG_CMD, "string==%s", + event->ptr ? (char *) event->ptr : "NULL"); break; case RT_ZCAU: event->parameter = -1; @@ -697,9 +661,7 @@ void gigaset_handle_modem_response(struct cardstate *cs) ++curarg; } else event->parameter = -1; -#ifdef CONFIG_GIGASET_DEBUG gig_dbg(DEBUG_CMD, "parameter==%d", event->parameter); -#endif break; } diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index 0037529..747178f 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h @@ -16,6 +16,9 @@ #ifndef GIGASET_H #define GIGASET_H +/* define global prefix for pr_ macros in linux/kernel.h */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/kernel.h> #include <linux/compiler.h> #include <linux/types.h> @@ -97,23 +100,6 @@ enum debuglevel { activated */ }; -/* Kernel message macros for situations where dev_printk and friends cannot be - * used for lack of reliable access to a device structure. - * linux/usb.h already contains these but in an obsolete form which clutters - * the log needlessly, and according to the USB maintainer those should be - * removed rather than fixed anyway. - */ -#undef err -#undef info -#undef warn - -#define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \ - format "\n" , ## arg) -#define info(format, arg...) printk(KERN_INFO KBUILD_MODNAME ": " \ - format "\n" , ## arg) -#define warn(format, arg...) printk(KERN_WARNING KBUILD_MODNAME ": " \ - format "\n" , ## arg) - #ifdef CONFIG_GIGASET_DEBUG #define gig_dbg(level, format, arg...) \ diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c index 3c127a8..69a702f 100644 --- a/drivers/isdn/gigaset/i4l.c +++ b/drivers/isdn/gigaset/i4l.c @@ -42,7 +42,7 @@ static int writebuf_from_LL(int driverID, int channel, int ack, unsigned skblen; if (!(cs = gigaset_get_cs_by_id(driverID))) { - err("%s: invalid driver ID (%d)", __func__, driverID); + pr_err("%s: invalid driver ID (%d)\n", __func__, driverID); return -ENODEV; } if (channel < 0 || channel >= cs->channels) { @@ -119,7 +119,7 @@ static int command_from_LL(isdn_ctrl *cntrl) gigaset_debugdrivers(); if (!cs) { - err("%s: invalid driver ID (%d)", __func__, cntrl->driver); + pr_err("%s: invalid driver ID (%d)\n", __func__, cntrl->driver); return -ENODEV; } diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index 521951a..311e7ca 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c @@ -107,7 +107,7 @@ static int if_config(struct cardstate *cs, int *arg) return -EBUSY; if (!cs->connected) { - err("not connected!"); + pr_err("%s: not connected\n", __func__); return -ENODEV; } @@ -143,9 +143,6 @@ static const struct tty_operations if_ops = { .set_termios = if_set_termios, .throttle = if_throttle, .unthrottle = if_unthrottle, -#if 0 - .break_ctl = serial_break, -#endif .tiocmget = if_tiocmget, .tiocmset = if_tiocmset, }; @@ -188,7 +185,7 @@ static void if_close(struct tty_struct *tty, struct file *filp) cs = (struct cardstate *) tty->driver_data; if (!cs) { - err("cs==NULL in %s", __func__); + pr_err("%s: no cardstate\n", __func__); return; } @@ -222,7 +219,7 @@ static int if_ioctl(struct tty_struct *tty, struct file *file, cs = (struct cardstate *) tty->driver_data; if (!cs) { - err("cs==NULL in %s", __func__); + pr_err("%s: no cardstate\n", __func__); return -ENODEV; } @@ -297,7 +294,7 @@ static int if_tiocmget(struct tty_struct *tty, struct file *file) cs = (struct cardstate *) tty->driver_data; if (!cs) { - err("cs==NULL in %s", __func__); + pr_err("%s: no cardstate\n", __func__); return -ENODEV; } @@ -323,7 +320,7 @@ static int if_tiocmset(struct tty_struct *tty, struct file *file, cs = (struct cardstate *) tty->driver_data; if (!cs) { - err("cs==NULL in %s", __func__); + pr_err("%s: no cardstate\n", __func__); return -ENODEV; } @@ -354,7 +351,7 @@ static int if_write(struct tty_struct *tty, const unsigned char *buf, int count) cs = (struct cardstate *) tty->driver_data; if (!cs) { - err("cs==NULL in %s", __func__); + pr_err("%s: no cardstate\n", __func__); return -ENODEV; } @@ -388,7 +385,7 @@ static int if_write_room(struct tty_struct *tty) cs = (struct cardstate *) tty->driver_data; if (!cs) { - err("cs==NULL in %s", __func__); + pr_err("%s: no cardstate\n", __func__); return -ENODEV; } @@ -420,7 +417,7 @@ static int if_chars_in_buffer(struct tty_struct *tty) cs = (struct cardstate *) tty->driver_data; if (!cs) { - err("cs==NULL in %s", __func__); + pr_err("%s: no cardstate\n", __func__); return -ENODEV; } @@ -451,7 +448,7 @@ static void if_throttle(struct tty_struct *tty) cs = (struct cardstate *) tty->driver_data; if (!cs) { - err("cs==NULL in %s", __func__); + pr_err("%s: no cardstate\n", __func__); return; } @@ -474,7 +471,7 @@ static void if_unthrottle(struct tty_struct *tty) cs = (struct cardstate *) tty->driver_data; if (!cs) { - err("cs==NULL in %s", __func__); + pr_err("%s: no cardstate\n", __func__); return; } @@ -501,7 +498,7 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old) cs = (struct cardstate *) tty->driver_data; if (!cs) { - err("cs==NULL in %s", __func__); + pr_err("%s: no cardstate\n", __func__); return; } @@ -565,29 +562,6 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old) cs->ops->set_line_ctrl(cs, cflag); -#if 0 - //FIXME this hangs M101 [ts 2005-03-09] - //FIXME do we need this? - /* - * Set flow control: well, I do not really now how to handle DTR/RTS. - * Just do what we have seen with SniffUSB on Win98. - */ - /* Drop DTR/RTS if no flow control otherwise assert */ - gig_dbg(DEBUG_IF, "%u: control_state %x", - cs->minor_index, control_state); - new_state = control_state; - if ((iflag & IXOFF) || (iflag & IXON) || (cflag & CRTSCTS)) - new_state |= TIOCM_DTR | TIOCM_RTS; - else - new_state &= ~(TIOCM_DTR | TIOCM_RTS); - if (new_state != control_state) { - gig_dbg(DEBUG_IF, "%u: new_state %x", - cs->minor_index, new_state); - gigaset_set_modem_ctrl(cs, control_state, new_state); - control_state = new_state; - } -#endif - /* save off the modified port settings */ cs->control_state = control_state; @@ -701,7 +675,7 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, ret = tty_register_driver(tty); if (ret < 0) { - warn("failed to register tty driver (error %d)", ret); + pr_err("error %d registering tty driver\n", ret); goto error; } gig_dbg(DEBUG_IF, "tty driver initialized"); @@ -709,7 +683,7 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, return; enomem: - warn("could not allocate tty structures"); + pr_err("out of memory\n"); error: if (drv->tty) put_tty_driver(drv->tty); diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c index fbce522..b171e75 100644 --- a/drivers/isdn/gigaset/isocdata.c +++ b/drivers/isdn/gigaset/isocdata.c @@ -88,11 +88,9 @@ static inline int isowbuf_startwrite(struct isowbuf_t *iwb) __func__); return 0; } -#ifdef CONFIG_GIGASET_DEBUG gig_dbg(DEBUG_ISO, "%s: acquired iso write semaphore, data[write]=%02x, nbits=%d", __func__, iwb->data[iwb->write], iwb->wbits); -#endif return 1; } @@ -173,13 +171,13 @@ int gigaset_isowbuf_getbytes(struct isowbuf_t *iwb, int size) __func__, read, write, limit); #ifdef CONFIG_GIGASET_DEBUG if (unlikely(size < 0 || size > BAS_OUTBUFPAD)) { - err("invalid size %d", size); + pr_err("invalid size %d\n", size); return -EINVAL; } src = iwb->read; if (unlikely(limit > BAS_OUTBUFSIZE + BAS_OUTBUFPAD || (read < src && limit >= src))) { - err("isoc write buffer frame reservation violated"); + pr_err("isoc write buffer frame reservation violated\n"); return -EFAULT; } #endif diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c index 07052ed..ac245e7 100644 --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c @@ -16,7 +16,6 @@ #include <linux/moduleparam.h> #include <linux/platform_device.h> #include <linux/tty.h> -#include <linux/poll.h> #include <linux/completion.h> /* Version Information */ @@ -408,7 +407,7 @@ static int gigaset_initcshw(struct cardstate *cs) int rc; if (!(cs->hw.ser = kzalloc(sizeof(struct ser_cardstate), GFP_KERNEL))) { - err("%s: out of memory!", __func__); + pr_err("out of memory\n"); return 0; } @@ -416,7 +415,7 @@ static int gigaset_initcshw(struct cardstate *cs) cs->hw.ser->dev.id = cs->minor_index; cs->hw.ser->dev.dev.release = gigaset_device_release; if ((rc = platform_device_register(&cs->hw.ser->dev)) != 0) { - err("error %d registering platform device", rc); + pr_err("error %d registering platform device\n", rc); kfree(cs->hw.ser); cs->hw.ser = NULL; return 0; @@ -514,11 +513,10 @@ gigaset_tty_open(struct tty_struct *tty) gig_dbg(DEBUG_INIT, "Starting HLL for Gigaset M101"); - info(DRIVER_AUTHOR); - info(DRIVER_DESC); + pr_info(DRIVER_DESC "\n"); if (!driver) { - err("%s: no driver structure", __func__); + pr_err("%s: no driver structure\n", __func__); return -ENODEV; } @@ -571,11 +569,10 @@ gigaset_tty_close(struct tty_struct *tty) } /* prevent other callers from entering ldisc methods */ - /* FIXME: should use the tty state flags */ tty->disc_data = NULL; if (!cs->hw.ser) - err("%s: no hw cardstate", __func__); + pr_err("%s: no hw cardstate\n", __func__); else { /* wait for running methods to finish */ if (!atomic_dec_and_test(&cs->hw.ser->refcnt)) @@ -673,18 +670,6 @@ gigaset_tty_ioctl(struct tty_struct *tty, struct file *file, } /* - * Poll on the tty. - * Unused, always return zero. - * - * FIXME: should probably return an exception - especially on hangup - */ -static unsigned int -gigaset_tty_poll(struct tty_struct *tty, struct file *file, poll_table *wait) -{ - return 0; -} - -/* * Called by the tty driver when a block of data has been received. * Will not be re-entered while running but other ldisc functions * may be called in parallel. @@ -773,7 +758,6 @@ static struct tty_ldisc_ops gigaset_ldisc = { .read = gigaset_tty_read, .write = gigaset_tty_write, .ioctl = gigaset_tty_ioctl, - .poll = gigaset_tty_poll, .receive_buf = gigaset_tty_receive, .write_wakeup = gigaset_tty_wakeup, }; @@ -788,7 +772,7 @@ static int __init ser_gigaset_init(void) gig_dbg(DEBUG_INIT, "%s", __func__); if ((rc = platform_driver_register(&device_driver)) != 0) { - err("error %d registering platform driver", rc); + pr_err("error %d registering platform driver\n", rc); return rc; } @@ -799,7 +783,7 @@ static int __init ser_gigaset_init(void) goto error; if ((rc = tty_register_ldisc(N_GIGASET_M101, &gigaset_ldisc)) != 0) { - err("error %d registering line discipline", rc); + pr_err("error %d registering line discipline\n", rc); goto error; } @@ -826,7 +810,7 @@ static void __exit ser_gigaset_exit(void) } if ((rc = tty_unregister_ldisc(N_GIGASET_M101)) != 0) - err("error %d unregistering line discipline", rc); + pr_err("error %d unregistering line discipline\n", rc); platform_driver_unregister(&device_driver); } diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index 4661830..fba61f6 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c @@ -407,7 +407,7 @@ static void gigaset_read_int_callback(struct urb *urb) spin_lock_irqsave(&cs->lock, flags); if (!cs->connected) { spin_unlock_irqrestore(&cs->lock, flags); - err("%s: disconnected", __func__); + pr_err("%s: disconnected\n", __func__); return; } r = usb_submit_urb(urb, GFP_ATOMIC); @@ -440,7 +440,7 @@ static void gigaset_write_bulk_callback(struct urb *urb) spin_lock_irqsave(&cs->lock, flags); if (!cs->connected) { - err("%s: not connected", __func__); + pr_err("%s: disconnected\n", __func__); } else { cs->hw.usb->busy = 0; tasklet_schedule(&cs->write_tasklet); @@ -612,8 +612,10 @@ static int gigaset_initcshw(struct cardstate *cs) cs->hw.usb = ucs = kmalloc(sizeof(struct usb_cardstate), GFP_KERNEL); - if (!ucs) + if (!ucs) { + pr_err("out of memory\n"); return 0; + } ucs->bchars[0] = 0; ucs->bchars[1] = 0; @@ -936,13 +938,11 @@ static int __init usb_gigaset_init(void) /* register this driver with the USB subsystem */ result = usb_register(&gigaset_usb_driver); if (result < 0) { - err("usb_gigaset: usb_register failed (error %d)", - -result); + pr_err("error %d registering USB driver\n", -result); goto error; } - info(DRIVER_AUTHOR); - info(DRIVER_DESC); + pr_info(DRIVER_DESC "\n"); return 0; error: |