* [PATCH] Staging: comedi: ni_stc.h: Fixed missing blank lines after declarations
@ 2015-04-26 21:51 Nicolae-Alexandru Ivan
0 siblings, 0 replies; only message in thread
From: Nicolae-Alexandru Ivan @ 2015-04-26 21:51 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Nicolae-Alexandru Ivan
Signed-off-by: Nicolae-Alexandru Ivan <alexnivan@gmail.com>
---
drivers/staging/comedi/drivers/ni_stc.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
index bd69c3f..75926c1 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -326,6 +326,7 @@ static inline unsigned RTSI_Output_Bit(unsigned channel, int is_mseries)
{
unsigned max_channel;
unsigned base_bit_shift;
+
if (is_mseries) {
base_bit_shift = 8;
max_channel = 7;
@@ -1142,6 +1143,7 @@ static inline unsigned MSeries_AI_Config_Bank_Bits(enum ni_reg_type reg_type,
unsigned channel)
{
unsigned bits = channel & 0x30;
+
if (reg_type == ni_reg_622x) {
if (channel & 0x40)
bits |= 0x400;
@@ -1191,6 +1193,7 @@ enum MSeries_PLL_Control_Bits {
static inline unsigned MSeries_PLL_Divisor_Bits(unsigned divisor)
{
static const unsigned max_divisor = 0x10;
+
if (divisor < 1 || divisor > max_divisor) {
pr_err("%s: bug, invalid divisor=%i\n", __func__, divisor);
return 0;
@@ -1201,6 +1204,7 @@ static inline unsigned MSeries_PLL_Divisor_Bits(unsigned divisor)
static inline unsigned MSeries_PLL_Multiplier_Bits(unsigned multiplier)
{
static const unsigned max_multiplier = 0x100;
+
if (multiplier < 1 || multiplier > max_multiplier) {
pr_err("%s: bug, invalid multiplier=%i\n", __func__,
multiplier);
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-04-26 21:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-26 21:51 [PATCH] Staging: comedi: ni_stc.h: Fixed missing blank lines after declarations Nicolae-Alexandru Ivan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®