aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/pci200syn.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-26 15:01:28 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-27 03:09:46 -0400
commit12a3bfefc8c1e43ddb50950cb74f8a11d680567a (patch)
treeff974d28811618a51ab8dcbef1588a1022cb9c74 /drivers/net/wan/pci200syn.c
parent2903dd654d8788425a9523959b02933ea6555229 (diff)
generic_hdlc: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/pci200syn.c')
-rw-r--r--drivers/net/wan/pci200syn.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c
index fd7375955e41..1ce21163c776 100644
--- a/drivers/net/wan/pci200syn.c
+++ b/drivers/net/wan/pci200syn.c
@@ -14,6 +14,8 @@
14 * PLX Technology Inc. PCI9052 Data Book 14 * PLX Technology Inc. PCI9052 Data Book
15 */ 15 */
16 16
17#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
18
17#include <linux/module.h> 19#include <linux/module.h>
18#include <linux/kernel.h> 20#include <linux/kernel.h>
19#include <linux/capability.h> 21#include <linux/capability.h>
@@ -297,7 +299,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
297 299
298 card = kzalloc(sizeof(card_t), GFP_KERNEL); 300 card = kzalloc(sizeof(card_t), GFP_KERNEL);
299 if (card == NULL) { 301 if (card == NULL) {
300 printk(KERN_ERR "pci200syn: unable to allocate memory\n"); 302 pr_err("unable to allocate memory\n");
301 pci_release_regions(pdev); 303 pci_release_regions(pdev);
302 pci_disable_device(pdev); 304 pci_disable_device(pdev);
303 return -ENOBUFS; 305 return -ENOBUFS;
@@ -306,7 +308,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
306 card->ports[0].netdev = alloc_hdlcdev(&card->ports[0]); 308 card->ports[0].netdev = alloc_hdlcdev(&card->ports[0]);
307 card->ports[1].netdev = alloc_hdlcdev(&card->ports[1]); 309 card->ports[1].netdev = alloc_hdlcdev(&card->ports[1]);
308 if (!card->ports[0].netdev || !card->ports[1].netdev) { 310 if (!card->ports[0].netdev || !card->ports[1].netdev) {
309 printk(KERN_ERR "pci200syn: unable to allocate memory\n"); 311 pr_err("unable to allocate memory\n");
310 pci200_pci_remove_one(pdev); 312 pci200_pci_remove_one(pdev);
311 return -ENOMEM; 313 return -ENOMEM;
312 } 314 }
@@ -314,7 +316,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
314 if (pci_resource_len(pdev, 0) != PCI200SYN_PLX_SIZE || 316 if (pci_resource_len(pdev, 0) != PCI200SYN_PLX_SIZE ||
315 pci_resource_len(pdev, 2) != PCI200SYN_SCA_SIZE || 317 pci_resource_len(pdev, 2) != PCI200SYN_SCA_SIZE ||
316 pci_resource_len(pdev, 3) < 16384) { 318 pci_resource_len(pdev, 3) < 16384) {
317 printk(KERN_ERR "pci200syn: invalid card EEPROM parameters\n"); 319 pr_err("invalid card EEPROM parameters\n");
318 pci200_pci_remove_one(pdev); 320 pci200_pci_remove_one(pdev);
319 return -EFAULT; 321 return -EFAULT;
320 } 322 }
@@ -331,7 +333,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
331 if (card->plxbase == NULL || 333 if (card->plxbase == NULL ||
332 card->scabase == NULL || 334 card->scabase == NULL ||
333 card->rambase == NULL) { 335 card->rambase == NULL) {
334 printk(KERN_ERR "pci200syn: ioremap() failed\n"); 336 pr_err("ioremap() failed\n");
335 pci200_pci_remove_one(pdev); 337 pci200_pci_remove_one(pdev);
336 return -EFAULT; 338 return -EFAULT;
337 } 339 }
@@ -357,12 +359,12 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
357 card->buff_offset = 2 * sizeof(pkt_desc) * (card->tx_ring_buffers + 359 card->buff_offset = 2 * sizeof(pkt_desc) * (card->tx_ring_buffers +
358 card->rx_ring_buffers); 360 card->rx_ring_buffers);
359 361
360 printk(KERN_INFO "pci200syn: %u KB RAM at 0x%x, IRQ%u, using %u TX +" 362 pr_info("%u KB RAM at 0x%x, IRQ%u, using %u TX + %u RX packets rings\n",
361 " %u RX packets rings\n", ramsize / 1024, ramphys, 363 ramsize / 1024, ramphys,
362 pdev->irq, card->tx_ring_buffers, card->rx_ring_buffers); 364 pdev->irq, card->tx_ring_buffers, card->rx_ring_buffers);
363 365
364 if (card->tx_ring_buffers < 1) { 366 if (card->tx_ring_buffers < 1) {
365 printk(KERN_ERR "pci200syn: RAM test failed\n"); 367 pr_err("RAM test failed\n");
366 pci200_pci_remove_one(pdev); 368 pci200_pci_remove_one(pdev);
367 return -EFAULT; 369 return -EFAULT;
368 } 370 }
@@ -373,8 +375,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
373 375
374 /* Allocate IRQ */ 376 /* Allocate IRQ */
375 if (request_irq(pdev->irq, sca_intr, IRQF_SHARED, "pci200syn", card)) { 377 if (request_irq(pdev->irq, sca_intr, IRQF_SHARED, "pci200syn", card)) {
376 printk(KERN_WARNING "pci200syn: could not allocate IRQ%d.\n", 378 pr_warn("could not allocate IRQ%d\n", pdev->irq);
377 pdev->irq);
378 pci200_pci_remove_one(pdev); 379 pci200_pci_remove_one(pdev);
379 return -EBUSY; 380 return -EBUSY;
380 } 381 }
@@ -400,15 +401,13 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
400 port->card = card; 401 port->card = card;
401 sca_init_port(port); 402 sca_init_port(port);
402 if (register_hdlc_device(dev)) { 403 if (register_hdlc_device(dev)) {
403 printk(KERN_ERR "pci200syn: unable to register hdlc " 404 pr_err("unable to register hdlc device\n");
404 "device\n");
405 port->card = NULL; 405 port->card = NULL;
406 pci200_pci_remove_one(pdev); 406 pci200_pci_remove_one(pdev);
407 return -ENOBUFS; 407 return -ENOBUFS;
408 } 408 }
409 409
410 printk(KERN_INFO "%s: PCI200SYN channel %d\n", 410 netdev_info(dev, "PCI200SYN channel %d\n", port->chan);
411 dev->name, port->chan);
412 } 411 }
413 412
414 sca_flush(card); 413 sca_flush(card);
@@ -435,7 +434,7 @@ static struct pci_driver pci200_pci_driver = {
435static int __init pci200_init_module(void) 434static int __init pci200_init_module(void)
436{ 435{
437 if (pci_clock_freq < 1000000 || pci_clock_freq > 80000000) { 436 if (pci_clock_freq < 1000000 || pci_clock_freq > 80000000) {
438 printk(KERN_ERR "pci200syn: Invalid PCI clock frequency\n"); 437 pr_err("Invalid PCI clock frequency\n");
439 return -EINVAL; 438 return -EINVAL;
440 } 439 }
441 return pci_register_driver(&pci200_pci_driver); 440 return pci_register_driver(&pci200_pci_driver);