Commit a8adadee authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: ni_660x: convert printk() to dev_...()

Convert the `printk()` calls in this drivers to use the `dev_...()`
calls instead.  Replace some `printk()` calls in the comedi `attach()`
handler (`ni_660x_attach()`) with a single `dev_info()` at the end.
Remove some `printk()` calls before `BUG()` calls.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c50e9939
......@@ -748,8 +748,6 @@ static enum NI_660x_Register ni_gpct_to_660x_register(enum ni_gpct_register reg)
ni_660x_register = G3InterruptEnable;
break;
default:
printk(KERN_WARNING "%s: unhandled register 0x%x in switch.\n",
__func__, reg);
BUG();
return 0;
break;
......@@ -773,8 +771,6 @@ static inline void ni_660x_write_register(struct comedi_device *dev,
writel(bits, write_address);
break;
default:
printk(KERN_WARNING "%s: %s: bug! unhandled case (reg=0x%x) in switch.\n",
__FILE__, __func__, reg);
BUG();
break;
}
......@@ -796,8 +792,6 @@ static inline unsigned ni_660x_read_register(struct comedi_device *dev,
return readl(read_address);
break;
default:
printk(KERN_WARNING "%s: %s: bug! unhandled case (reg=0x%x) in switch.\n",
__FILE__, __func__, reg);
BUG();
break;
}
......@@ -1070,8 +1064,6 @@ static int ni_660x_attach(struct comedi_device *dev,
unsigned i;
unsigned global_interrupt_config_bits;
printk(KERN_INFO "comedi%d: ni_660x: ", dev->minor);
ret = ni_660x_allocate_private(dev);
if (ret < 0)
return ret;
......@@ -1083,7 +1075,7 @@ static int ni_660x_attach(struct comedi_device *dev,
ret = mite_setup2(private(dev)->mite, 1);
if (ret < 0) {
printk(KERN_WARNING "error setting up mite\n");
dev_warn(dev->class_dev, "error setting up mite\n");
return ret;
}
comedi_set_hw_dev(dev, &private(dev)->mite->pcidev->dev);
......@@ -1091,8 +1083,6 @@ static int ni_660x_attach(struct comedi_device *dev,
if (ret < 0)
return ret;
printk(KERN_INFO " %s ", dev->board_name);
ret = comedi_alloc_subdevices(dev, 2 + NI_660X_MAX_NUM_COUNTERS);
if (ret)
return ret;
......@@ -1174,7 +1164,7 @@ static int ni_660x_attach(struct comedi_device *dev,
ret = request_irq(mite_irq(private(dev)->mite), ni_660x_interrupt,
IRQF_SHARED, "ni_660x", dev);
if (ret < 0) {
printk(KERN_WARNING " irq not available\n");
dev_warn(dev->class_dev, " irq not available\n");
return ret;
}
dev->irq = mite_irq(private(dev)->mite);
......@@ -1183,7 +1173,7 @@ static int ni_660x_attach(struct comedi_device *dev,
global_interrupt_config_bits |= Cascade_Int_Enable_Bit;
ni_660x_write_register(dev, 0, global_interrupt_config_bits,
GlobalInterruptConfigRegister);
printk(KERN_INFO "attached\n");
dev_info(dev->class_dev, "ni_660x: %s attached\n", dev->board_name);
return 0;
}
......@@ -1262,7 +1252,7 @@ static int ni_660x_find_device(struct comedi_device *dev, int bus, int slot)
}
}
}
printk(KERN_WARNING "no device found\n");
dev_warn(dev->class_dev, "no device found\n");
mite_list_devices();
return -EIO;
}
......
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