aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@web.de>2009-03-05 15:30:37 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-03-16 18:09:28 -0400
commitad5e72ee81ed074cfe6bb2a1ca231b5413efa41f (patch)
tree16636018b893212d8f763e1b78ced8d74c722650 /drivers/net/wireless/p54
parent2ac710720c523dd243662746da4381dd4f1772f8 (diff)
p54pci: convert printk(KERN_* to dev_*
This patch replaces most printk(KERN_* "") with their by dev_* analogue. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54')
-rw-r--r--drivers/net/wireless/p54/p54pci.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c
index 46626e5dcbbe..e3569a0a952d 100644
--- a/drivers/net/wireless/p54/p54pci.c
+++ b/drivers/net/wireless/p54/p54pci.c
@@ -413,8 +413,7 @@ static int p54p_open(struct ieee80211_hw *dev)
413 err = request_irq(priv->pdev->irq, &p54p_interrupt, 413 err = request_irq(priv->pdev->irq, &p54p_interrupt,
414 IRQF_SHARED, "p54pci", dev); 414 IRQF_SHARED, "p54pci", dev);
415 if (err) { 415 if (err) {
416 printk(KERN_ERR "%s: failed to register IRQ handler\n", 416 dev_err(&priv->pdev->dev, "failed to register IRQ handler\n");
417 wiphy_name(dev->wiphy));
418 return err; 417 return err;
419 } 418 }
420 419
@@ -476,30 +475,26 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
476 475
477 err = pci_enable_device(pdev); 476 err = pci_enable_device(pdev);
478 if (err) { 477 if (err) {
479 printk(KERN_ERR "%s (p54pci): Cannot enable new PCI device\n", 478 dev_err(&pdev->dev, "Cannot enable new PCI device\n");
480 pci_name(pdev));
481 return err; 479 return err;
482 } 480 }
483 481
484 mem_addr = pci_resource_start(pdev, 0); 482 mem_addr = pci_resource_start(pdev, 0);
485 mem_len = pci_resource_len(pdev, 0); 483 mem_len = pci_resource_len(pdev, 0);
486 if (mem_len < sizeof(struct p54p_csr)) { 484 if (mem_len < sizeof(struct p54p_csr)) {
487 printk(KERN_ERR "%s (p54pci): Too short PCI resources\n", 485 dev_err(&pdev->dev, "Too short PCI resources\n");
488 pci_name(pdev));
489 goto err_disable_dev; 486 goto err_disable_dev;
490 } 487 }
491 488
492 err = pci_request_regions(pdev, "p54pci"); 489 err = pci_request_regions(pdev, "p54pci");
493 if (err) { 490 if (err) {
494 printk(KERN_ERR "%s (p54pci): Cannot obtain PCI resources\n", 491 dev_err(&pdev->dev, "Cannot obtain PCI resources\n");
495 pci_name(pdev));
496 goto err_disable_dev; 492 goto err_disable_dev;
497 } 493 }
498 494
499 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) || 495 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) ||
500 pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { 496 pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
501 printk(KERN_ERR "%s (p54pci): No suitable DMA available\n", 497 dev_err(&pdev->dev, "No suitable DMA available\n");
502 pci_name(pdev));
503 goto err_free_reg; 498 goto err_free_reg;
504 } 499 }
505 500
@@ -511,8 +506,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
511 506
512 dev = p54_init_common(sizeof(*priv)); 507 dev = p54_init_common(sizeof(*priv));
513 if (!dev) { 508 if (!dev) {
514 printk(KERN_ERR "%s (p54pci): ieee80211 alloc failed\n", 509 dev_err(&pdev->dev, "ieee80211 alloc failed\n");
515 pci_name(pdev));
516 err = -ENOMEM; 510 err = -ENOMEM;
517 goto err_free_reg; 511 goto err_free_reg;
518 } 512 }
@@ -525,17 +519,15 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
525 519
526 priv->map = ioremap(mem_addr, mem_len); 520 priv->map = ioremap(mem_addr, mem_len);
527 if (!priv->map) { 521 if (!priv->map) {
528 printk(KERN_ERR "%s (p54pci): Cannot map device memory\n", 522 dev_err(&pdev->dev, "Cannot map device memory\n");
529 pci_name(pdev)); 523 err = -ENOMEM;
530 err = -EINVAL; // TODO: use a better error code?
531 goto err_free_dev; 524 goto err_free_dev;
532 } 525 }
533 526
534 priv->ring_control = pci_alloc_consistent(pdev, sizeof(*priv->ring_control), 527 priv->ring_control = pci_alloc_consistent(pdev, sizeof(*priv->ring_control),
535 &priv->ring_control_dma); 528 &priv->ring_control_dma);
536 if (!priv->ring_control) { 529 if (!priv->ring_control) {
537 printk(KERN_ERR "%s (p54pci): Cannot allocate rings\n", 530 dev_err(&pdev->dev, "Cannot allocate rings\n");
538 pci_name(pdev));
539 err = -ENOMEM; 531 err = -ENOMEM;
540 goto err_iounmap; 532 goto err_iounmap;
541 } 533 }
@@ -549,8 +541,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
549 err = request_firmware(&priv->firmware, "isl3886pci", 541 err = request_firmware(&priv->firmware, "isl3886pci",
550 &priv->pdev->dev); 542 &priv->pdev->dev);
551 if (err) { 543 if (err) {
552 printk(KERN_ERR "%s (p54pci): cannot find firmware " 544 dev_err(&pdev->dev, "Cannot find firmware (isl3886pci)\n");
553 "(isl3886pci)\n", pci_name(priv->pdev));
554 err = request_firmware(&priv->firmware, "isl3886", 545 err = request_firmware(&priv->firmware, "isl3886",
555 &priv->pdev->dev); 546 &priv->pdev->dev);
556 if (err) 547 if (err)