diff options
author | Ravishankar karkala Mallikarjunayya <ravishankar.km@greenturtles.in> | 2011-11-18 23:36:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-26 21:45:19 -0500 |
commit | be545c6251875797fdd9add35a48a1111e896d1e (patch) | |
tree | 21ed6e2e6d64520ec331e25ca3389cb6ba27810e /drivers/staging | |
parent | 4547251f6a9cf6d2f4255b918668526417973315 (diff) |
Staging: comedi: fix printk issue in adv_pci1710.c
This is a patch to the adv_pci1710.c file that fixes up a printk
warning found by the checkpatch.pl tool.
Converted printks to dev_version and Removed an unnecessary printk
statements.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/comedi/drivers/adv_pci1710.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c index da2b75b15d4..8318c82a555 100644 --- a/drivers/staging/comedi/drivers/adv_pci1710.c +++ b/drivers/staging/comedi/drivers/adv_pci1710.c | |||
@@ -1382,16 +1382,14 @@ static int pci1710_attach(struct comedi_device *dev, | |||
1382 | int i; | 1382 | int i; |
1383 | int board_index; | 1383 | int board_index; |
1384 | 1384 | ||
1385 | printk("comedi%d: adv_pci1710: ", dev->minor); | 1385 | dev_info(dev->hw_dev, "comedi%d: adv_pci1710:\n", dev->minor); |
1386 | 1386 | ||
1387 | opt_bus = it->options[0]; | 1387 | opt_bus = it->options[0]; |
1388 | opt_slot = it->options[1]; | 1388 | opt_slot = it->options[1]; |
1389 | 1389 | ||
1390 | ret = alloc_private(dev, sizeof(struct pci1710_private)); | 1390 | ret = alloc_private(dev, sizeof(struct pci1710_private)); |
1391 | if (ret < 0) { | 1391 | if (ret < 0) |
1392 | printk(" - Allocation failed!\n"); | ||
1393 | return -ENOMEM; | 1392 | return -ENOMEM; |
1394 | } | ||
1395 | 1393 | ||
1396 | /* Look for matching PCI device */ | 1394 | /* Look for matching PCI device */ |
1397 | errstr = "not found!"; | 1395 | errstr = "not found!"; |
@@ -1436,10 +1434,10 @@ static int pci1710_attach(struct comedi_device *dev, | |||
1436 | 1434 | ||
1437 | if (!pcidev) { | 1435 | if (!pcidev) { |
1438 | if (opt_bus || opt_slot) { | 1436 | if (opt_bus || opt_slot) { |
1439 | printk(" - Card at b:s %d:%d %s\n", | 1437 | dev_err(dev->hw_dev, "- Card at b:s %d:%d %s\n", |
1440 | opt_bus, opt_slot, errstr); | 1438 | opt_bus, opt_slot, errstr); |
1441 | } else { | 1439 | } else { |
1442 | printk(" - Card %s\n", errstr); | 1440 | dev_err(dev->hw_dev, "- Card %s\n", errstr); |
1443 | } | 1441 | } |
1444 | return -EIO; | 1442 | return -EIO; |
1445 | } | 1443 | } |
@@ -1450,8 +1448,8 @@ static int pci1710_attach(struct comedi_device *dev, | |||
1450 | irq = pcidev->irq; | 1448 | irq = pcidev->irq; |
1451 | iobase = pci_resource_start(pcidev, 2); | 1449 | iobase = pci_resource_start(pcidev, 2); |
1452 | 1450 | ||
1453 | printk(", b:s:f=%d:%d:%d, io=0x%4lx", pci_bus, pci_slot, pci_func, | 1451 | dev_dbg(dev->hw_dev, "b:s:f=%d:%d:%d, io=0x%4lx\n", pci_bus, pci_slot, |
1454 | iobase); | 1452 | pci_func, iobase); |
1455 | 1453 | ||
1456 | dev->iobase = iobase; | 1454 | dev->iobase = iobase; |
1457 | 1455 | ||
@@ -1471,10 +1469,8 @@ static int pci1710_attach(struct comedi_device *dev, | |||
1471 | n_subdevices++; | 1469 | n_subdevices++; |
1472 | 1470 | ||
1473 | ret = alloc_subdevices(dev, n_subdevices); | 1471 | ret = alloc_subdevices(dev, n_subdevices); |
1474 | if (ret < 0) { | 1472 | if (ret < 0) |
1475 | printk(" - Allocation failed!\n"); | ||
1476 | return ret; | 1473 | return ret; |
1477 | } | ||
1478 | 1474 | ||
1479 | pci1710_reset(dev); | 1475 | pci1710_reset(dev); |
1480 | 1476 | ||
@@ -1483,24 +1479,20 @@ static int pci1710_attach(struct comedi_device *dev, | |||
1483 | if (request_irq(irq, interrupt_service_pci1710, | 1479 | if (request_irq(irq, interrupt_service_pci1710, |
1484 | IRQF_SHARED, "Advantech PCI-1710", | 1480 | IRQF_SHARED, "Advantech PCI-1710", |
1485 | dev)) { | 1481 | dev)) { |
1486 | printk | 1482 | dev_dbg(dev->hw_dev, "unable to allocate IRQ %d, DISABLING IT", |
1487 | (", unable to allocate IRQ %d, DISABLING IT", | 1483 | irq); |
1488 | irq); | ||
1489 | irq = 0; /* Can't use IRQ */ | 1484 | irq = 0; /* Can't use IRQ */ |
1490 | } else { | 1485 | } else { |
1491 | printk(", irq=%u", irq); | 1486 | dev_dbg(dev->hw_dev, "irq=%u", irq); |
1492 | } | 1487 | } |
1493 | } else { | 1488 | } else { |
1494 | printk(", IRQ disabled"); | 1489 | dev_dbg(dev->hw_dev, "IRQ disabled"); |
1495 | } | 1490 | } |
1496 | } else { | 1491 | } else { |
1497 | irq = 0; | 1492 | irq = 0; |
1498 | } | 1493 | } |
1499 | 1494 | ||
1500 | dev->irq = irq; | 1495 | dev->irq = irq; |
1501 | |||
1502 | printk(".\n"); | ||
1503 | |||
1504 | subdev = 0; | 1496 | subdev = 0; |
1505 | 1497 | ||
1506 | if (this_board->n_aichan) { | 1498 | if (this_board->n_aichan) { |