Commit ad5e72ee authored by Christian Lamparter's avatar Christian Lamparter Committed by John W. Linville

p54pci: convert printk(KERN_* to dev_*

This patch replaces most printk(KERN_* "") with their by dev_* analogue.
Signed-off-by: default avatarChristian Lamparter <chunkeey@web.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2ac71072
...@@ -413,8 +413,7 @@ static int p54p_open(struct ieee80211_hw *dev) ...@@ -413,8 +413,7 @@ static int p54p_open(struct ieee80211_hw *dev)
err = request_irq(priv->pdev->irq, &p54p_interrupt, err = request_irq(priv->pdev->irq, &p54p_interrupt,
IRQF_SHARED, "p54pci", dev); IRQF_SHARED, "p54pci", dev);
if (err) { if (err) {
printk(KERN_ERR "%s: failed to register IRQ handler\n", dev_err(&priv->pdev->dev, "failed to register IRQ handler\n");
wiphy_name(dev->wiphy));
return err; return err;
} }
...@@ -476,30 +475,26 @@ static int __devinit p54p_probe(struct pci_dev *pdev, ...@@ -476,30 +475,26 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
err = pci_enable_device(pdev); err = pci_enable_device(pdev);
if (err) { if (err) {
printk(KERN_ERR "%s (p54pci): Cannot enable new PCI device\n", dev_err(&pdev->dev, "Cannot enable new PCI device\n");
pci_name(pdev));
return err; return err;
} }
mem_addr = pci_resource_start(pdev, 0); mem_addr = pci_resource_start(pdev, 0);
mem_len = pci_resource_len(pdev, 0); mem_len = pci_resource_len(pdev, 0);
if (mem_len < sizeof(struct p54p_csr)) { if (mem_len < sizeof(struct p54p_csr)) {
printk(KERN_ERR "%s (p54pci): Too short PCI resources\n", dev_err(&pdev->dev, "Too short PCI resources\n");
pci_name(pdev));
goto err_disable_dev; goto err_disable_dev;
} }
err = pci_request_regions(pdev, "p54pci"); err = pci_request_regions(pdev, "p54pci");
if (err) { if (err) {
printk(KERN_ERR "%s (p54pci): Cannot obtain PCI resources\n", dev_err(&pdev->dev, "Cannot obtain PCI resources\n");
pci_name(pdev));
goto err_disable_dev; goto err_disable_dev;
} }
if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) || if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) ||
pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
printk(KERN_ERR "%s (p54pci): No suitable DMA available\n", dev_err(&pdev->dev, "No suitable DMA available\n");
pci_name(pdev));
goto err_free_reg; goto err_free_reg;
} }
...@@ -511,8 +506,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev, ...@@ -511,8 +506,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
dev = p54_init_common(sizeof(*priv)); dev = p54_init_common(sizeof(*priv));
if (!dev) { if (!dev) {
printk(KERN_ERR "%s (p54pci): ieee80211 alloc failed\n", dev_err(&pdev->dev, "ieee80211 alloc failed\n");
pci_name(pdev));
err = -ENOMEM; err = -ENOMEM;
goto err_free_reg; goto err_free_reg;
} }
...@@ -525,17 +519,15 @@ static int __devinit p54p_probe(struct pci_dev *pdev, ...@@ -525,17 +519,15 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
priv->map = ioremap(mem_addr, mem_len); priv->map = ioremap(mem_addr, mem_len);
if (!priv->map) { if (!priv->map) {
printk(KERN_ERR "%s (p54pci): Cannot map device memory\n", dev_err(&pdev->dev, "Cannot map device memory\n");
pci_name(pdev)); err = -ENOMEM;
err = -EINVAL; // TODO: use a better error code?
goto err_free_dev; goto err_free_dev;
} }
priv->ring_control = pci_alloc_consistent(pdev, sizeof(*priv->ring_control), priv->ring_control = pci_alloc_consistent(pdev, sizeof(*priv->ring_control),
&priv->ring_control_dma); &priv->ring_control_dma);
if (!priv->ring_control) { if (!priv->ring_control) {
printk(KERN_ERR "%s (p54pci): Cannot allocate rings\n", dev_err(&pdev->dev, "Cannot allocate rings\n");
pci_name(pdev));
err = -ENOMEM; err = -ENOMEM;
goto err_iounmap; goto err_iounmap;
} }
...@@ -549,8 +541,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev, ...@@ -549,8 +541,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
err = request_firmware(&priv->firmware, "isl3886pci", err = request_firmware(&priv->firmware, "isl3886pci",
&priv->pdev->dev); &priv->pdev->dev);
if (err) { if (err) {
printk(KERN_ERR "%s (p54pci): cannot find firmware " dev_err(&pdev->dev, "Cannot find firmware (isl3886pci)\n");
"(isl3886pci)\n", pci_name(priv->pdev));
err = request_firmware(&priv->firmware, "isl3886", err = request_firmware(&priv->firmware, "isl3886",
&priv->pdev->dev); &priv->pdev->dev);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment