Skip to content

Commit 396ec3d

Browse files
sudipm-mukherjeegregkh
authored andcommitted
ppdev: use dev_* macros
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>
1 parent e7223f1 commit 396ec3d

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎drivers/char/ppdev.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ static int register_device(int minor, struct pp_struct *pp)
313313
}
314314

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

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

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

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

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

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

735735
if (pp->flags & PP_CLAIMED) {

0 commit comments

Comments
 (0)