diff options
author | Michael Büsch <m@bues.ch> | 2018-07-31 22:56:38 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-08-09 18:45:50 +0300 |
commit | b8b6069cf2087545fe53ec920e8353133e9a70bf (patch) | |
tree | f4a9eea68710798c1d8794c4d0c85c7defea25b5 /drivers/ssb/main.c | |
parent | 4d77a89e3924b12f4a5628b21237e57ab4703866 (diff) | |
download | linux-b8b6069cf2087545fe53ec920e8353133e9a70bf.tar.xz |
ssb: Remove home-grown printk wrappers
Replace the ssb printk wrappers by standard print helpers.
Also remove SSB_SILENT. Nobody should use it anyway.
Originally submitted by Joe Perches <joe@perches.com>.
Modified to add dev_... based printks.
Signed-off-by: Michael Buesch <m@bues.ch>
Tested-by: Michael Buesch <m@bues.ch>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/ssb/main.c')
-rw-r--r-- | drivers/ssb/main.c | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 116594413f66..9da56d2fdbd3 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c @@ -256,7 +256,8 @@ int ssb_devices_thaw(struct ssb_freeze_context *ctx) err = sdrv->probe(sdev, &sdev->id); if (err) { - ssb_err("Failed to thaw device %s\n", + dev_err(sdev->dev, + "Failed to thaw device %s\n", dev_name(sdev->dev)); result = err; } @@ -431,9 +432,9 @@ void ssb_bus_unregister(struct ssb_bus *bus) err = ssb_gpio_unregister(bus); if (err == -EBUSY) - ssb_dbg("Some GPIOs are still in use\n"); + pr_debug("Some GPIOs are still in use\n"); else if (err) - ssb_dbg("Can not unregister GPIO driver: %i\n", err); + pr_debug("Can not unregister GPIO driver: %i\n", err); ssb_buses_lock(); ssb_devices_unregister(bus); @@ -518,7 +519,7 @@ static int ssb_devices_register(struct ssb_bus *bus) sdev->dev = dev; err = device_register(dev); if (err) { - ssb_err("Could not register %s\n", dev_name(dev)); + pr_err("Could not register %s\n", dev_name(dev)); /* Set dev to NULL to not unregister * dev on error unwinding. */ sdev->dev = NULL; @@ -576,9 +577,9 @@ static int ssb_attach_queued_buses(void) err = ssb_gpio_init(bus); if (err == -ENOTSUPP) - ssb_dbg("GPIO driver not activated\n"); + pr_debug("GPIO driver not activated\n"); else if (err) - ssb_dbg("Error registering GPIO driver: %i\n", err); + pr_debug("Error registering GPIO driver: %i\n", err); ssb_bus_may_powerdown(bus); @@ -707,10 +708,12 @@ int ssb_bus_pcibus_register(struct ssb_bus *bus, struct pci_dev *host_pci) err = ssb_bus_register(bus, ssb_pci_get_invariants, 0); if (!err) { - ssb_info("Sonics Silicon Backplane found on PCI device %s\n", + dev_info(&host_pci->dev, + "Sonics Silicon Backplane found on PCI device %s\n", dev_name(&host_pci->dev)); } else { - ssb_err("Failed to register PCI version of SSB with error %d\n", + dev_err(&host_pci->dev, + "Failed to register PCI version of SSB with error %d\n", err); } @@ -731,7 +734,8 @@ int ssb_bus_pcmciabus_register(struct ssb_bus *bus, err = ssb_bus_register(bus, ssb_pcmcia_get_invariants, baseaddr); if (!err) { - ssb_info("Sonics Silicon Backplane found on PCMCIA device %s\n", + dev_info(&pcmcia_dev->dev, + "Sonics Silicon Backplane found on PCMCIA device %s\n", pcmcia_dev->devname); } @@ -752,7 +756,8 @@ int ssb_bus_sdiobus_register(struct ssb_bus *bus, struct sdio_func *func, err = ssb_bus_register(bus, ssb_sdio_get_invariants, ~0); if (!err) { - ssb_info("Sonics Silicon Backplane found on SDIO device %s\n", + dev_info(&func->dev, + "Sonics Silicon Backplane found on SDIO device %s\n", sdio_func_id(func)); } @@ -771,8 +776,8 @@ int ssb_bus_host_soc_register(struct ssb_bus *bus, unsigned long baseaddr) err = ssb_bus_register(bus, ssb_host_soc_get_invariants, baseaddr); if (!err) { - ssb_info("Sonics Silicon Backplane found at address 0x%08lX\n", - baseaddr); + pr_info("Sonics Silicon Backplane found at address 0x%08lX\n", + baseaddr); } return err; @@ -1057,9 +1062,9 @@ static int ssb_wait_bits(struct ssb_device *dev, u16 reg, u32 bitmask, } udelay(10); } - printk(KERN_ERR PFX "Timeout waiting for bitmask %08X on " - "register %04X to %s.\n", - bitmask, reg, (set ? "set" : "clear")); + dev_err(dev->dev, + "Timeout waiting for bitmask %08X on register %04X to %s\n", + bitmask, reg, set ? "set" : "clear"); return -ETIMEDOUT; } @@ -1169,7 +1174,7 @@ out: #endif return err; error: - ssb_err("Bus powerdown failed\n"); + pr_err("Bus powerdown failed\n"); goto out; } EXPORT_SYMBOL(ssb_bus_may_powerdown); @@ -1192,7 +1197,7 @@ int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl) return 0; error: - ssb_err("Bus powerup failed\n"); + pr_err("Bus powerup failed\n"); return err; } EXPORT_SYMBOL(ssb_bus_powerup); @@ -1300,19 +1305,19 @@ static int __init ssb_modinit(void) err = b43_pci_ssb_bridge_init(); if (err) { - ssb_err("Broadcom 43xx PCI-SSB-bridge initialization failed\n"); + pr_err("Broadcom 43xx PCI-SSB-bridge initialization failed\n"); /* don't fail SSB init because of this */ err = 0; } err = ssb_host_pcmcia_init(); if (err) { - ssb_err("PCMCIA host initialization failed\n"); + pr_err("PCMCIA host initialization failed\n"); /* don't fail SSB init because of this */ err = 0; } err = ssb_gige_init(); if (err) { - ssb_err("SSB Broadcom Gigabit Ethernet driver initialization failed\n"); + pr_err("SSB Broadcom Gigabit Ethernet driver initialization failed\n"); /* don't fail SSB init because of this */ err = 0; } |