aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChase Southwood <chase.southwood@gmail.com>2014-12-01 00:05:56 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-12-02 19:54:43 -0500
commit6c410db7c4305da28107f8b2b650ffe7d010aed1 (patch)
treeb83b62a19c184cd468dc3d4cc333190b44dde432
parent5b53672bbc410e20cda96d045a3372d6212fc3bc (diff)
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>
-rw-r--r--drivers/staging/comedi/drivers/ni_mio_common.c2
-rw-r--r--drivers/staging/comedi/drivers/ni_stc.h14
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index 353c17bb4325..11e70173712d 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -3945,7 +3945,7 @@ static unsigned ni_gpct_to_stc_register(enum ni_gpct_register reg)
3945 stc_register = Interrupt_B_Enable_Register; 3945 stc_register = Interrupt_B_Enable_Register;
3946 break; 3946 break;
3947 default: 3947 default:
3948 printk("%s: unhandled register 0x%x in switch.\n", 3948 pr_err("%s: unhandled register 0x%x in switch.\n",
3949 __func__, reg); 3949 __func__, reg);
3950 BUG(); 3950 BUG();
3951 return 0; 3951 return 0;
diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
index 131e9049f21b..bd69c3f0acdc 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -334,7 +334,7 @@ static inline unsigned RTSI_Output_Bit(unsigned channel, int is_mseries)
334 max_channel = 6; 334 max_channel = 6;
335 } 335 }
336 if (channel > max_channel) { 336 if (channel > max_channel) {
337 printk("%s: bug, invalid RTSI_channel=%i\n", __func__, channel); 337 pr_err("%s: bug, invalid RTSI_channel=%i\n", __func__, channel);
338 return 0; 338 return 0;
339 } 339 }
340 return 1 << (base_bit_shift + channel); 340 return 1 << (base_bit_shift + channel);
@@ -1090,7 +1090,7 @@ static inline int M_Offset_Static_AI_Control(int i)
1090 0x263, 1090 0x263,
1091 }; 1091 };
1092 if (((unsigned)i) >= ARRAY_SIZE(offset)) { 1092 if (((unsigned)i) >= ARRAY_SIZE(offset)) {
1093 printk("%s: invalid channel=%i\n", __func__, i); 1093 pr_err("%s: invalid channel=%i\n", __func__, i);
1094 return offset[0]; 1094 return offset[0];
1095 } 1095 }
1096 return offset[i]; 1096 return offset[i];
@@ -1105,7 +1105,7 @@ static inline int M_Offset_AO_Reference_Attenuation(int channel)
1105 0x267 1105 0x267
1106 }; 1106 };
1107 if (((unsigned)channel) >= ARRAY_SIZE(offset)) { 1107 if (((unsigned)channel) >= ARRAY_SIZE(offset)) {
1108 printk("%s: invalid channel=%i\n", __func__, channel); 1108 pr_err("%s: invalid channel=%i\n", __func__, channel);
1109 return offset[0]; 1109 return offset[0];
1110 } 1110 }
1111 return offset[channel]; 1111 return offset[channel];
@@ -1114,7 +1114,7 @@ static inline int M_Offset_AO_Reference_Attenuation(int channel)
1114static inline unsigned M_Offset_PFI_Output_Select(unsigned n) 1114static inline unsigned M_Offset_PFI_Output_Select(unsigned n)
1115{ 1115{
1116 if (n < 1 || n > NUM_PFI_OUTPUT_SELECT_REGS) { 1116 if (n < 1 || n > NUM_PFI_OUTPUT_SELECT_REGS) {
1117 printk("%s: invalid pfi output select register=%i\n", 1117 pr_err("%s: invalid pfi output select register=%i\n",
1118 __func__, n); 1118 __func__, n);
1119 return M_Offset_PFI_Output_Select_1; 1119 return M_Offset_PFI_Output_Select_1;
1120 } 1120 }
@@ -1171,7 +1171,7 @@ static inline unsigned MSeries_PLL_In_Source_Select_RTSI_Bits(unsigned
1171 RTSI_channel) 1171 RTSI_channel)
1172{ 1172{
1173 if (RTSI_channel > 7) { 1173 if (RTSI_channel > 7) {
1174 printk("%s: bug, invalid RTSI_channel=%i\n", __func__, 1174 pr_err("%s: bug, invalid RTSI_channel=%i\n", __func__,
1175 RTSI_channel); 1175 RTSI_channel);
1176 return 0; 1176 return 0;
1177 } 1177 }
@@ -1192,7 +1192,7 @@ static inline unsigned MSeries_PLL_Divisor_Bits(unsigned divisor)
1192{ 1192{
1193 static const unsigned max_divisor = 0x10; 1193 static const unsigned max_divisor = 0x10;
1194 if (divisor < 1 || divisor > max_divisor) { 1194 if (divisor < 1 || divisor > max_divisor) {
1195 printk("%s: bug, invalid divisor=%i\n", __func__, divisor); 1195 pr_err("%s: bug, invalid divisor=%i\n", __func__, divisor);
1196 return 0; 1196 return 0;
1197 } 1197 }
1198 return (divisor & 0xf) << 8; 1198 return (divisor & 0xf) << 8;
@@ -1202,7 +1202,7 @@ static inline unsigned MSeries_PLL_Multiplier_Bits(unsigned multiplier)
1202{ 1202{
1203 static const unsigned max_multiplier = 0x100; 1203 static const unsigned max_multiplier = 0x100;
1204 if (multiplier < 1 || multiplier > max_multiplier) { 1204 if (multiplier < 1 || multiplier > max_multiplier) {
1205 printk("%s: bug, invalid multiplier=%i\n", __func__, 1205 pr_err("%s: bug, invalid multiplier=%i\n", __func__,
1206 multiplier); 1206 multiplier);
1207 return 0; 1207 return 0;
1208 } 1208 }