staging: comedi: change some printk calls to pr_err

There are a handful of calls to printk in ni_stc.h without specified log
levels, as well as one in ni_mio_common.c.  This patch converts these
calls to pr_err() instead, so that they are now explicitly log level
ERR.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Chase Southwood 2014-11-30 23:05:56 -06:00 committed by Greg Kroah-Hartman
parent 5b53672bbc
commit 6c410db7c4
2 changed files with 8 additions and 8 deletions

View File

@ -3945,7 +3945,7 @@ static unsigned ni_gpct_to_stc_register(enum ni_gpct_register reg)
stc_register = Interrupt_B_Enable_Register; stc_register = Interrupt_B_Enable_Register;
break; break;
default: default:
printk("%s: unhandled register 0x%x in switch.\n", pr_err("%s: unhandled register 0x%x in switch.\n",
__func__, reg); __func__, reg);
BUG(); BUG();
return 0; return 0;

View File

@ -334,7 +334,7 @@ static inline unsigned RTSI_Output_Bit(unsigned channel, int is_mseries)
max_channel = 6; max_channel = 6;
} }
if (channel > max_channel) { if (channel > max_channel) {
printk("%s: bug, invalid RTSI_channel=%i\n", __func__, channel); pr_err("%s: bug, invalid RTSI_channel=%i\n", __func__, channel);
return 0; return 0;
} }
return 1 << (base_bit_shift + channel); return 1 << (base_bit_shift + channel);
@ -1090,7 +1090,7 @@ static inline int M_Offset_Static_AI_Control(int i)
0x263, 0x263,
}; };
if (((unsigned)i) >= ARRAY_SIZE(offset)) { if (((unsigned)i) >= ARRAY_SIZE(offset)) {
printk("%s: invalid channel=%i\n", __func__, i); pr_err("%s: invalid channel=%i\n", __func__, i);
return offset[0]; return offset[0];
} }
return offset[i]; return offset[i];
@ -1105,7 +1105,7 @@ static inline int M_Offset_AO_Reference_Attenuation(int channel)
0x267 0x267
}; };
if (((unsigned)channel) >= ARRAY_SIZE(offset)) { if (((unsigned)channel) >= ARRAY_SIZE(offset)) {
printk("%s: invalid channel=%i\n", __func__, channel); pr_err("%s: invalid channel=%i\n", __func__, channel);
return offset[0]; return offset[0];
} }
return offset[channel]; return offset[channel];
@ -1114,7 +1114,7 @@ static inline int M_Offset_AO_Reference_Attenuation(int channel)
static inline unsigned M_Offset_PFI_Output_Select(unsigned n) static inline unsigned M_Offset_PFI_Output_Select(unsigned n)
{ {
if (n < 1 || n > NUM_PFI_OUTPUT_SELECT_REGS) { if (n < 1 || n > NUM_PFI_OUTPUT_SELECT_REGS) {
printk("%s: invalid pfi output select register=%i\n", pr_err("%s: invalid pfi output select register=%i\n",
__func__, n); __func__, n);
return M_Offset_PFI_Output_Select_1; return M_Offset_PFI_Output_Select_1;
} }
@ -1171,7 +1171,7 @@ static inline unsigned MSeries_PLL_In_Source_Select_RTSI_Bits(unsigned
RTSI_channel) RTSI_channel)
{ {
if (RTSI_channel > 7) { if (RTSI_channel > 7) {
printk("%s: bug, invalid RTSI_channel=%i\n", __func__, pr_err("%s: bug, invalid RTSI_channel=%i\n", __func__,
RTSI_channel); RTSI_channel);
return 0; return 0;
} }
@ -1192,7 +1192,7 @@ static inline unsigned MSeries_PLL_Divisor_Bits(unsigned divisor)
{ {
static const unsigned max_divisor = 0x10; static const unsigned max_divisor = 0x10;
if (divisor < 1 || divisor > max_divisor) { if (divisor < 1 || divisor > max_divisor) {
printk("%s: bug, invalid divisor=%i\n", __func__, divisor); pr_err("%s: bug, invalid divisor=%i\n", __func__, divisor);
return 0; return 0;
} }
return (divisor & 0xf) << 8; return (divisor & 0xf) << 8;
@ -1202,7 +1202,7 @@ static inline unsigned MSeries_PLL_Multiplier_Bits(unsigned multiplier)
{ {
static const unsigned max_multiplier = 0x100; static const unsigned max_multiplier = 0x100;
if (multiplier < 1 || multiplier > max_multiplier) { if (multiplier < 1 || multiplier > max_multiplier) {
printk("%s: bug, invalid multiplier=%i\n", __func__, pr_err("%s: bug, invalid multiplier=%i\n", __func__,
multiplier); multiplier);
return 0; return 0;
} }