diff options
author | Joe Perches <joe@perches.com> | 2013-02-20 15:16:13 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-03-06 16:24:23 -0500 |
commit | 33a606ac8020b47292bcfda30c7888c1ab5233e2 (patch) | |
tree | 90854660647b5eced80c6a9cfe2930a7425a50e7 /drivers/ssb/main.c | |
parent | e5652756ff36ed9e1283121f788e6a17117efcab (diff) |
ssb: Convert ssb_printk to ssb_<level>
Use a more current logging style.
Convert ssb_dbprint to ssb_dbg too.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/ssb/main.c')
-rw-r--r-- | drivers/ssb/main.c | 51 |
1 files changed, 22 insertions, 29 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 3b645b8a261f..812775a4bfb6 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
@@ -275,8 +275,8 @@ int ssb_devices_thaw(struct ssb_freeze_context *ctx) | |||
275 | 275 | ||
276 | err = sdrv->probe(sdev, &sdev->id); | 276 | err = sdrv->probe(sdev, &sdev->id); |
277 | if (err) { | 277 | if (err) { |
278 | ssb_printk(KERN_ERR PFX "Failed to thaw device %s\n", | 278 | ssb_err("Failed to thaw device %s\n", |
279 | dev_name(sdev->dev)); | 279 | dev_name(sdev->dev)); |
280 | result = err; | 280 | result = err; |
281 | } | 281 | } |
282 | ssb_device_put(sdev); | 282 | ssb_device_put(sdev); |
@@ -447,10 +447,9 @@ void ssb_bus_unregister(struct ssb_bus *bus) | |||
447 | 447 | ||
448 | err = ssb_gpio_unregister(bus); | 448 | err = ssb_gpio_unregister(bus); |
449 | if (err == -EBUSY) | 449 | if (err == -EBUSY) |
450 | ssb_dprintk(KERN_ERR PFX "Some GPIOs are still in use.\n"); | 450 | ssb_dbg("Some GPIOs are still in use\n"); |
451 | else if (err) | 451 | else if (err) |
452 | ssb_dprintk(KERN_ERR PFX | 452 | ssb_dbg("Can not unregister GPIO driver: %i\n", err); |
453 | "Can not unregister GPIO driver: %i\n", err); | ||
454 | 453 | ||
455 | ssb_buses_lock(); | 454 | ssb_buses_lock(); |
456 | ssb_devices_unregister(bus); | 455 | ssb_devices_unregister(bus); |
@@ -497,8 +496,7 @@ static int ssb_devices_register(struct ssb_bus *bus) | |||
497 | 496 | ||
498 | devwrap = kzalloc(sizeof(*devwrap), GFP_KERNEL); | 497 | devwrap = kzalloc(sizeof(*devwrap), GFP_KERNEL); |
499 | if (!devwrap) { | 498 | if (!devwrap) { |
500 | ssb_printk(KERN_ERR PFX | 499 | ssb_err("Could not allocate device\n"); |
501 | "Could not allocate device\n"); | ||
502 | err = -ENOMEM; | 500 | err = -ENOMEM; |
503 | goto error; | 501 | goto error; |
504 | } | 502 | } |
@@ -537,9 +535,7 @@ static int ssb_devices_register(struct ssb_bus *bus) | |||
537 | sdev->dev = dev; | 535 | sdev->dev = dev; |
538 | err = device_register(dev); | 536 | err = device_register(dev); |
539 | if (err) { | 537 | if (err) { |
540 | ssb_printk(KERN_ERR PFX | 538 | ssb_err("Could not register %s\n", dev_name(dev)); |
541 | "Could not register %s\n", | ||
542 | dev_name(dev)); | ||
543 | /* Set dev to NULL to not unregister | 539 | /* Set dev to NULL to not unregister |
544 | * dev on error unwinding. */ | 540 | * dev on error unwinding. */ |
545 | sdev->dev = NULL; | 541 | sdev->dev = NULL; |
@@ -825,10 +821,9 @@ static int ssb_bus_register(struct ssb_bus *bus, | |||
825 | ssb_mipscore_init(&bus->mipscore); | 821 | ssb_mipscore_init(&bus->mipscore); |
826 | err = ssb_gpio_init(bus); | 822 | err = ssb_gpio_init(bus); |
827 | if (err == -ENOTSUPP) | 823 | if (err == -ENOTSUPP) |
828 | ssb_dprintk(KERN_DEBUG PFX "GPIO driver not activated\n"); | 824 | ssb_dbg("GPIO driver not activated\n"); |
829 | else if (err) | 825 | else if (err) |
830 | ssb_dprintk(KERN_ERR PFX | 826 | ssb_dbg("Error registering GPIO driver: %i\n", err); |
831 | "Error registering GPIO driver: %i\n", err); | ||
832 | err = ssb_fetch_invariants(bus, get_invariants); | 827 | err = ssb_fetch_invariants(bus, get_invariants); |
833 | if (err) { | 828 | if (err) { |
834 | ssb_bus_may_powerdown(bus); | 829 | ssb_bus_may_powerdown(bus); |
@@ -878,11 +873,11 @@ int ssb_bus_pcibus_register(struct ssb_bus *bus, struct pci_dev *host_pci) | |||
878 | 873 | ||
879 | err = ssb_bus_register(bus, ssb_pci_get_invariants, 0); | 874 | err = ssb_bus_register(bus, ssb_pci_get_invariants, 0); |
880 | if (!err) { | 875 | if (!err) { |
881 | ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found on " | 876 | ssb_info("Sonics Silicon Backplane found on PCI device %s\n", |
882 | "PCI device %s\n", dev_name(&host_pci->dev)); | 877 | dev_name(&host_pci->dev)); |
883 | } else { | 878 | } else { |
884 | ssb_printk(KERN_ERR PFX "Failed to register PCI version" | 879 | ssb_err("Failed to register PCI version of SSB with error %d\n", |
885 | " of SSB with error %d\n", err); | 880 | err); |
886 | } | 881 | } |
887 | 882 | ||
888 | return err; | 883 | return err; |
@@ -903,8 +898,8 @@ int ssb_bus_pcmciabus_register(struct ssb_bus *bus, | |||
903 | 898 | ||
904 | err = ssb_bus_register(bus, ssb_pcmcia_get_invariants, baseaddr); | 899 | err = ssb_bus_register(bus, ssb_pcmcia_get_invariants, baseaddr); |
905 | if (!err) { | 900 | if (!err) { |
906 | ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found on " | 901 | ssb_info("Sonics Silicon Backplane found on PCMCIA device %s\n", |
907 | "PCMCIA device %s\n", pcmcia_dev->devname); | 902 | pcmcia_dev->devname); |
908 | } | 903 | } |
909 | 904 | ||
910 | return err; | 905 | return err; |
@@ -925,8 +920,8 @@ int ssb_bus_sdiobus_register(struct ssb_bus *bus, struct sdio_func *func, | |||
925 | 920 | ||
926 | err = ssb_bus_register(bus, ssb_sdio_get_invariants, ~0); | 921 | err = ssb_bus_register(bus, ssb_sdio_get_invariants, ~0); |
927 | if (!err) { | 922 | if (!err) { |
928 | ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found on " | 923 | ssb_info("Sonics Silicon Backplane found on SDIO device %s\n", |
929 | "SDIO device %s\n", sdio_func_id(func)); | 924 | sdio_func_id(func)); |
930 | } | 925 | } |
931 | 926 | ||
932 | return err; | 927 | return err; |
@@ -944,8 +939,8 @@ int ssb_bus_ssbbus_register(struct ssb_bus *bus, unsigned long baseaddr, | |||
944 | 939 | ||
945 | err = ssb_bus_register(bus, get_invariants, baseaddr); | 940 | err = ssb_bus_register(bus, get_invariants, baseaddr); |
946 | if (!err) { | 941 | if (!err) { |
947 | ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found at " | 942 | ssb_info("Sonics Silicon Backplane found at address 0x%08lX\n", |
948 | "address 0x%08lX\n", baseaddr); | 943 | baseaddr); |
949 | } | 944 | } |
950 | 945 | ||
951 | return err; | 946 | return err; |
@@ -1339,7 +1334,7 @@ out: | |||
1339 | #endif | 1334 | #endif |
1340 | return err; | 1335 | return err; |
1341 | error: | 1336 | error: |
1342 | ssb_printk(KERN_ERR PFX "Bus powerdown failed\n"); | 1337 | ssb_err("Bus powerdown failed\n"); |
1343 | goto out; | 1338 | goto out; |
1344 | } | 1339 | } |
1345 | EXPORT_SYMBOL(ssb_bus_may_powerdown); | 1340 | EXPORT_SYMBOL(ssb_bus_may_powerdown); |
@@ -1362,7 +1357,7 @@ int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl) | |||
1362 | 1357 | ||
1363 | return 0; | 1358 | return 0; |
1364 | error: | 1359 | error: |
1365 | ssb_printk(KERN_ERR PFX "Bus powerup failed\n"); | 1360 | ssb_err("Bus powerup failed\n"); |
1366 | return err; | 1361 | return err; |
1367 | } | 1362 | } |
1368 | EXPORT_SYMBOL(ssb_bus_powerup); | 1363 | EXPORT_SYMBOL(ssb_bus_powerup); |
@@ -1470,15 +1465,13 @@ static int __init ssb_modinit(void) | |||
1470 | 1465 | ||
1471 | err = b43_pci_ssb_bridge_init(); | 1466 | err = b43_pci_ssb_bridge_init(); |
1472 | if (err) { | 1467 | if (err) { |
1473 | ssb_printk(KERN_ERR "Broadcom 43xx PCI-SSB-bridge " | 1468 | ssb_err("Broadcom 43xx PCI-SSB-bridge initialization failed\n"); |
1474 | "initialization failed\n"); | ||
1475 | /* don't fail SSB init because of this */ | 1469 | /* don't fail SSB init because of this */ |
1476 | err = 0; | 1470 | err = 0; |
1477 | } | 1471 | } |
1478 | err = ssb_gige_init(); | 1472 | err = ssb_gige_init(); |
1479 | if (err) { | 1473 | if (err) { |
1480 | ssb_printk(KERN_ERR "SSB Broadcom Gigabit Ethernet " | 1474 | ssb_err("SSB Broadcom Gigabit Ethernet driver initialization failed\n"); |
1481 | "driver initialization failed\n"); | ||
1482 | /* don't fail SSB init because of this */ | 1475 | /* don't fail SSB init because of this */ |
1483 | err = 0; | 1476 | err = 0; |
1484 | } | 1477 | } |