Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC ADC 100M 14b 4cha - Software
Commits
4ea168a1
Commit
4ea168a1
authored
Feb 08, 2018
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: validate saturation value
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
9120d5e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
fa-zio-drv.c
kernel/fa-zio-drv.c
+14
-0
No files found.
kernel/fa-zio-drv.c
View file @
4ea168a1
...
...
@@ -186,6 +186,20 @@ static int zfad_conf_set(struct device *dev, struct zio_attribute *zattr,
case
ZFA_SW_R_NOADDERS_AUTO
:
fa
->
enable_auto_start
=
usr_val
;
return
0
;
case
ZFA_CHx_SAT
:
/* TODO when TLV */
break
;
/* FIXME temporary until TLV control */
case
ZFA_CH1_SAT
:
case
ZFA_CH2_SAT
:
case
ZFA_CH3_SAT
:
case
ZFA_CH4_SAT
:
if
(
usr_val
&
~
zfad_regs
[
reg_index
].
mask
)
{
dev_err
(
dev
,
"invalid saturation value (max: %d)
\n
"
,
zfad_regs
[
reg_index
].
mask
);
return
-
EINVAL
;
}
break
;
/* FIXME temporary until TLV control */
case
ZFA_CH1_OFFSET
:
i
--
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment