Skip to content

Commit

Permalink
PNP: Switch over to dev_dbg()
Browse files Browse the repository at this point in the history
Debug output in dmesg log may confuse users, so restrict debug output
to cases where DEBUG is defined or dynamic debug output is enabled
for the respective code piece.

Signed-off-by: Heiner Kallweit <[email protected]>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
hkallweit authored and rafaeljw committed May 17, 2021
1 parent b15fc7c commit 5bb5cea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions drivers/pnp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,8 @@ int pnp_add_device(struct pnp_dev *dev)
for (id = dev->id; id; id = id->next)
len += scnprintf(buf + len, sizeof(buf) - len, " %s", id->id);

dev_printk(KERN_DEBUG, &dev->dev, "%s device, IDs%s (%s)\n",
dev->protocol->name, buf,
dev->active ? "active" : "disabled");
dev_dbg(&dev->dev, "%s device, IDs%s (%s)\n", dev->protocol->name, buf,
dev->active ? "active" : "disabled");
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/pnp/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ struct pnp_resource *pnp_add_irq_resource(struct pnp_dev *dev, int irq,
res->start = irq;
res->end = irq;

dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
dev_dbg(&dev->dev, "%pR\n", res);
return pnp_res;
}

Expand Down

0 comments on commit 5bb5cea

Please sign in to comment.