diff options
Diffstat (limited to 'drivers/isdn/gigaset/interface.c')
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index af195b07c191..521951a898ec 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c | |||
@@ -197,7 +197,7 @@ static void if_close(struct tty_struct *tty, struct file *filp) | |||
197 | mutex_lock(&cs->mutex); | 197 | mutex_lock(&cs->mutex); |
198 | 198 | ||
199 | if (!cs->open_count) | 199 | if (!cs->open_count) |
200 | warn("%s: device not opened", __func__); | 200 | dev_warn(cs->dev, "%s: device not opened\n", __func__); |
201 | else { | 201 | else { |
202 | if (!--cs->open_count) { | 202 | if (!--cs->open_count) { |
203 | spin_lock_irqsave(&cs->lock, flags); | 203 | spin_lock_irqsave(&cs->lock, flags); |
@@ -232,7 +232,7 @@ static int if_ioctl(struct tty_struct *tty, struct file *file, | |||
232 | return -ERESTARTSYS; // FIXME -EINTR? | 232 | return -ERESTARTSYS; // FIXME -EINTR? |
233 | 233 | ||
234 | if (!cs->open_count) | 234 | if (!cs->open_count) |
235 | warn("%s: device not opened", __func__); | 235 | dev_warn(cs->dev, "%s: device not opened\n", __func__); |
236 | else { | 236 | else { |
237 | retval = 0; | 237 | retval = 0; |
238 | switch (cmd) { | 238 | switch (cmd) { |
@@ -364,9 +364,9 @@ static int if_write(struct tty_struct *tty, const unsigned char *buf, int count) | |||
364 | return -ERESTARTSYS; // FIXME -EINTR? | 364 | return -ERESTARTSYS; // FIXME -EINTR? |
365 | 365 | ||
366 | if (!cs->open_count) | 366 | if (!cs->open_count) |
367 | warn("%s: device not opened", __func__); | 367 | dev_warn(cs->dev, "%s: device not opened\n", __func__); |
368 | else if (cs->mstate != MS_LOCKED) { | 368 | else if (cs->mstate != MS_LOCKED) { |
369 | warn("can't write to unlocked device"); | 369 | dev_warn(cs->dev, "can't write to unlocked device\n"); |
370 | retval = -EBUSY; | 370 | retval = -EBUSY; |
371 | } else if (!cs->connected) { | 371 | } else if (!cs->connected) { |
372 | gig_dbg(DEBUG_ANY, "can't write to unplugged device"); | 372 | gig_dbg(DEBUG_ANY, "can't write to unplugged device"); |
@@ -398,9 +398,9 @@ static int if_write_room(struct tty_struct *tty) | |||
398 | return -ERESTARTSYS; // FIXME -EINTR? | 398 | return -ERESTARTSYS; // FIXME -EINTR? |
399 | 399 | ||
400 | if (!cs->open_count) | 400 | if (!cs->open_count) |
401 | warn("%s: device not opened", __func__); | 401 | dev_warn(cs->dev, "%s: device not opened\n", __func__); |
402 | else if (cs->mstate != MS_LOCKED) { | 402 | else if (cs->mstate != MS_LOCKED) { |
403 | warn("can't write to unlocked device"); | 403 | dev_warn(cs->dev, "can't write to unlocked device\n"); |
404 | retval = -EBUSY; | 404 | retval = -EBUSY; |
405 | } else if (!cs->connected) { | 405 | } else if (!cs->connected) { |
406 | gig_dbg(DEBUG_ANY, "can't write to unplugged device"); | 406 | gig_dbg(DEBUG_ANY, "can't write to unplugged device"); |
@@ -430,9 +430,9 @@ static int if_chars_in_buffer(struct tty_struct *tty) | |||
430 | return -ERESTARTSYS; // FIXME -EINTR? | 430 | return -ERESTARTSYS; // FIXME -EINTR? |
431 | 431 | ||
432 | if (!cs->open_count) | 432 | if (!cs->open_count) |
433 | warn("%s: device not opened", __func__); | 433 | dev_warn(cs->dev, "%s: device not opened\n", __func__); |
434 | else if (cs->mstate != MS_LOCKED) { | 434 | else if (cs->mstate != MS_LOCKED) { |
435 | warn("can't write to unlocked device"); | 435 | dev_warn(cs->dev, "can't write to unlocked device\n"); |
436 | retval = -EBUSY; | 436 | retval = -EBUSY; |
437 | } else if (!cs->connected) { | 437 | } else if (!cs->connected) { |
438 | gig_dbg(DEBUG_ANY, "can't write to unplugged device"); | 438 | gig_dbg(DEBUG_ANY, "can't write to unplugged device"); |
@@ -460,7 +460,7 @@ static void if_throttle(struct tty_struct *tty) | |||
460 | mutex_lock(&cs->mutex); | 460 | mutex_lock(&cs->mutex); |
461 | 461 | ||
462 | if (!cs->open_count) | 462 | if (!cs->open_count) |
463 | warn("%s: device not opened", __func__); | 463 | dev_warn(cs->dev, "%s: device not opened\n", __func__); |
464 | else { | 464 | else { |
465 | //FIXME | 465 | //FIXME |
466 | } | 466 | } |
@@ -483,7 +483,7 @@ static void if_unthrottle(struct tty_struct *tty) | |||
483 | mutex_lock(&cs->mutex); | 483 | mutex_lock(&cs->mutex); |
484 | 484 | ||
485 | if (!cs->open_count) | 485 | if (!cs->open_count) |
486 | warn("%s: device not opened", __func__); | 486 | dev_warn(cs->dev, "%s: device not opened\n", __func__); |
487 | else { | 487 | else { |
488 | //FIXME | 488 | //FIXME |
489 | } | 489 | } |
@@ -510,7 +510,7 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old) | |||
510 | mutex_lock(&cs->mutex); | 510 | mutex_lock(&cs->mutex); |
511 | 511 | ||
512 | if (!cs->open_count) { | 512 | if (!cs->open_count) { |
513 | warn("%s: device not opened", __func__); | 513 | dev_warn(cs->dev, "%s: device not opened\n", __func__); |
514 | goto out; | 514 | goto out; |
515 | } | 515 | } |
516 | 516 | ||
@@ -623,7 +623,8 @@ void gigaset_if_init(struct cardstate *cs) | |||
623 | if (!IS_ERR(cs->tty_dev)) | 623 | if (!IS_ERR(cs->tty_dev)) |
624 | dev_set_drvdata(cs->tty_dev, cs); | 624 | dev_set_drvdata(cs->tty_dev, cs); |
625 | else { | 625 | else { |
626 | warn("could not register device to the tty subsystem"); | 626 | dev_warn(cs->dev, |
627 | "could not register device to the tty subsystem\n"); | ||
627 | cs->tty_dev = NULL; | 628 | cs->tty_dev = NULL; |
628 | } | 629 | } |
629 | mutex_unlock(&cs->mutex); | 630 | mutex_unlock(&cs->mutex); |