diff options
Diffstat (limited to 'drivers/char/ppdev.c')
-rw-r--r-- | drivers/char/ppdev.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c index c84c34fb1231..432655bcb04c 100644 --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c | |||
@@ -114,8 +114,7 @@ static ssize_t pp_read (struct file * file, char __user * buf, size_t count, | |||
114 | 114 | ||
115 | if (!(pp->flags & PP_CLAIMED)) { | 115 | if (!(pp->flags & PP_CLAIMED)) { |
116 | /* Don't have the port claimed */ | 116 | /* Don't have the port claimed */ |
117 | printk (KERN_DEBUG CHRDEV "%x: claim the port first\n", | 117 | pr_debug(CHRDEV "%x: claim the port first\n", minor); |
118 | minor); | ||
119 | return -EINVAL; | 118 | return -EINVAL; |
120 | } | 119 | } |
121 | 120 | ||
@@ -198,8 +197,7 @@ static ssize_t pp_write (struct file * file, const char __user * buf, | |||
198 | 197 | ||
199 | if (!(pp->flags & PP_CLAIMED)) { | 198 | if (!(pp->flags & PP_CLAIMED)) { |
200 | /* Don't have the port claimed */ | 199 | /* Don't have the port claimed */ |
201 | printk (KERN_DEBUG CHRDEV "%x: claim the port first\n", | 200 | pr_debug(CHRDEV "%x: claim the port first\n", minor); |
202 | minor); | ||
203 | return -EINVAL; | 201 | return -EINVAL; |
204 | } | 202 | } |
205 | 203 | ||
@@ -313,7 +311,7 @@ static int register_device (int minor, struct pp_struct *pp) | |||
313 | } | 311 | } |
314 | 312 | ||
315 | pp->pdev = pdev; | 313 | pp->pdev = pdev; |
316 | printk (KERN_DEBUG "%s: registered pardevice\n", name); | 314 | pr_debug("%s: registered pardevice\n", name); |
317 | return 0; | 315 | return 0; |
318 | } | 316 | } |
319 | 317 | ||
@@ -343,8 +341,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
343 | int ret; | 341 | int ret; |
344 | 342 | ||
345 | if (pp->flags & PP_CLAIMED) { | 343 | if (pp->flags & PP_CLAIMED) { |
346 | printk (KERN_DEBUG CHRDEV | 344 | pr_debug(CHRDEV "%x: you've already got it!\n", minor); |
347 | "%x: you've already got it!\n", minor); | ||
348 | return -EINVAL; | 345 | return -EINVAL; |
349 | } | 346 | } |
350 | 347 | ||
@@ -379,7 +376,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
379 | } | 376 | } |
380 | case PPEXCL: | 377 | case PPEXCL: |
381 | if (pp->pdev) { | 378 | if (pp->pdev) { |
382 | printk (KERN_DEBUG CHRDEV "%x: too late for PPEXCL; " | 379 | pr_debug(CHRDEV "%x: too late for PPEXCL; " |
383 | "already registered\n", minor); | 380 | "already registered\n", minor); |
384 | if (pp->flags & PP_EXCL) | 381 | if (pp->flags & PP_EXCL) |
385 | /* But it's not really an error. */ | 382 | /* But it's not really an error. */ |
@@ -491,8 +488,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
491 | /* Everything else requires the port to be claimed, so check | 488 | /* Everything else requires the port to be claimed, so check |
492 | * that now. */ | 489 | * that now. */ |
493 | if ((pp->flags & PP_CLAIMED) == 0) { | 490 | if ((pp->flags & PP_CLAIMED) == 0) { |
494 | printk (KERN_DEBUG CHRDEV "%x: claim the port first\n", | 491 | pr_debug(CHRDEV "%x: claim the port first\n", minor); |
495 | minor); | ||
496 | return -EINVAL; | 492 | return -EINVAL; |
497 | } | 493 | } |
498 | 494 | ||
@@ -624,8 +620,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
624 | return 0; | 620 | return 0; |
625 | 621 | ||
626 | default: | 622 | default: |
627 | printk (KERN_DEBUG CHRDEV "%x: What? (cmd=0x%x)\n", minor, | 623 | pr_debug(CHRDEV "%x: What? (cmd=0x%x)\n", minor, cmd); |
628 | cmd); | ||
629 | return -EINVAL; | 624 | return -EINVAL; |
630 | } | 625 | } |
631 | 626 | ||
@@ -698,9 +693,8 @@ static int pp_release (struct inode * inode, struct file * file) | |||
698 | } | 693 | } |
699 | if (compat_negot) { | 694 | if (compat_negot) { |
700 | parport_negotiate (pp->pdev->port, IEEE1284_MODE_COMPAT); | 695 | parport_negotiate (pp->pdev->port, IEEE1284_MODE_COMPAT); |
701 | printk (KERN_DEBUG CHRDEV | 696 | pr_debug(CHRDEV "%x: negotiated back to compatibility " |
702 | "%x: negotiated back to compatibility mode because " | 697 | "mode because user-space forgot\n", minor); |
703 | "user-space forgot\n", minor); | ||
704 | } | 698 | } |
705 | 699 | ||
706 | if (pp->flags & PP_CLAIMED) { | 700 | if (pp->flags & PP_CLAIMED) { |
@@ -713,7 +707,7 @@ static int pp_release (struct inode * inode, struct file * file) | |||
713 | info->phase = pp->saved_state.phase; | 707 | info->phase = pp->saved_state.phase; |
714 | parport_release (pp->pdev); | 708 | parport_release (pp->pdev); |
715 | if (compat_negot != 1) { | 709 | if (compat_negot != 1) { |
716 | printk (KERN_DEBUG CHRDEV "%x: released pardevice " | 710 | pr_debug(CHRDEV "%x: released pardevice " |
717 | "because user-space forgot\n", minor); | 711 | "because user-space forgot\n", minor); |
718 | } | 712 | } |
719 | } | 713 | } |
@@ -723,8 +717,7 @@ static int pp_release (struct inode * inode, struct file * file) | |||
723 | parport_unregister_device (pp->pdev); | 717 | parport_unregister_device (pp->pdev); |
724 | kfree (name); | 718 | kfree (name); |
725 | pp->pdev = NULL; | 719 | pp->pdev = NULL; |
726 | printk (KERN_DEBUG CHRDEV "%x: unregistered pardevice\n", | 720 | pr_debug(CHRDEV "%x: unregistered pardevice\n", minor); |
727 | minor); | ||
728 | } | 721 | } |
729 | 722 | ||
730 | kfree (pp); | 723 | kfree (pp); |