drivers: gpio: amd8111: prefer dev_err()/dev_info() over raw printk

For logging in device contexts, dev_*() functions are preferred over
raw printk(), which also print out device name.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Link: https://lore.kernel.org/r/20201203182423.5499-2-info@metux.net
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Enrico Weigelt, metux IT consult 2020-12-03 19:24:22 +01:00 committed by Linus Walleij
parent 3bf1d26c8a
commit a922a24454
1 changed files with 2 additions and 4 deletions

View File

@ -179,7 +179,6 @@ static int __init amd_gpio_init(void)
struct pci_dev *pdev = NULL; struct pci_dev *pdev = NULL;
const struct pci_device_id *ent; const struct pci_device_id *ent;
/* We look for our device - AMD South Bridge /* We look for our device - AMD South Bridge
* I don't know about a system with two such bridges, * I don't know about a system with two such bridges,
* so we can assume that there is max. one device. * so we can assume that there is max. one device.
@ -223,11 +222,10 @@ found:
spin_lock_init(&gp.lock); spin_lock_init(&gp.lock);
printk(KERN_INFO "AMD-8111 GPIO detected\n"); dev_info(&pdev->dev, "AMD-8111 GPIO detected\n");
err = gpiochip_add_data(&gp.chip, &gp); err = gpiochip_add_data(&gp.chip, &gp);
if (err) { if (err) {
printk(KERN_ERR "GPIO registering failed (%d)\n", dev_err(&pdev->dev, "GPIO registering failed (%d)\n", err);
err);
ioport_unmap(gp.pm); ioport_unmap(gp.pm);
goto out; goto out;
} }