Skip to content

Commit

Permalink
ppdev: use dev_* macros
Browse files Browse the repository at this point in the history
It is more preffered to use the dev_* family of macros instead of using
the generic pr_*.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Sudip Mukherjee authored and Greg Kroah-Hartman committed Feb 15, 2016
1 parent e7223f1 commit 396ec3d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/char/ppdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ static int register_device(int minor, struct pp_struct *pp)
}

pp->pdev = pdev;
pr_debug("%s: registered pardevice\n", name);
dev_dbg(&pdev->dev, "registered pardevice\n");
return 0;
}

Expand Down Expand Up @@ -359,7 +359,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
int ret;

if (pp->flags & PP_CLAIMED) {
pr_debug(CHRDEV "%x: you've already got it!\n", minor);
dev_dbg(&pp->pdev->dev, "you've already got it!\n");
return -EINVAL;
}

Expand Down Expand Up @@ -394,8 +394,8 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
}
case PPEXCL:
if (pp->pdev) {
pr_debug(CHRDEV "%x: too late for PPEXCL; "
"already registered\n", minor);
dev_dbg(&pp->pdev->dev,
"too late for PPEXCL; already registered\n");
if (pp->flags & PP_EXCL)
/* But it's not really an error. */
return 0;
Expand Down Expand Up @@ -647,7 +647,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return 0;

default:
pr_debug(CHRDEV "%x: What? (cmd=0x%x)\n", minor, cmd);
dev_dbg(&pp->pdev->dev, "What? (cmd=0x%x)\n", cmd);
return -EINVAL;
}

Expand Down Expand Up @@ -728,8 +728,8 @@ static int pp_release(struct inode *inode, struct file *file)
}
if (compat_negot) {
parport_negotiate(pp->pdev->port, IEEE1284_MODE_COMPAT);
pr_debug(CHRDEV "%x: negotiated back to compatibility "
"mode because user-space forgot\n", minor);
dev_dbg(&pp->pdev->dev,
"negotiated back to compatibility mode because user-space forgot\n");
}

if (pp->flags & PP_CLAIMED) {
Expand Down

0 comments on commit 396ec3d

Please sign in to comment.