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
ad3e941e
Commit
ad3e941e
authored
Mar 06, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: checkpatch fixes
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
6b7610c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
18 deletions
+17
-18
buffer-zio.c
lib/buffer-zio.c
+2
-2
config-zio.c
lib/config-zio.c
+13
-14
fmc-adc-100m14b4cha.c
lib/fmc-adc-100m14b4cha.c
+2
-2
No files found.
lib/buffer-zio.c
View file @
ad3e941e
...
...
@@ -66,7 +66,7 @@ static int fmcadc_zio_read_data(struct __fmcadc_dev_zio *fa,
/* we allocated buf->nsamples, we can have more or less */
if
(
buf
->
nsamples
<
ctrl
->
nsamples
)
datalen
=
samplesize
*
buf
->
nsamples
;
datalen
=
samplesize
*
buf
->
nsamples
;
else
datalen
=
samplesize
*
ctrl
->
nsamples
;
...
...
@@ -181,7 +181,7 @@ int fmcadc_zio_fill_buffer(struct fmcadc_dev *dev,
else
to_ms
=
to
->
tv_sec
/
1000
+
(
to
->
tv_usec
+
500
)
/
1000
;
ret
=
poll
(
&
p
,
1
,
to_ms
);
switch
(
ret
)
{
switch
(
ret
)
{
case
0
:
errno
=
EAGAIN
;
/* fall through */
...
...
lib/config-zio.c
View file @
ad3e941e
...
...
@@ -53,7 +53,7 @@ static int __fa_zio_sysfs_set(struct __fmcadc_dev_zio *fa, char *name,
}
static
int
__fa_zio_sysfs_get
(
struct
__fmcadc_dev_zio
*
fa
,
char
*
name
,
char
*
val
/* no maxlen: reader knows */
)
char
*
val
/* no maxlen: reader knows */
)
{
char
pathname
[
128
];
int
fd
,
ret
;
...
...
@@ -76,7 +76,7 @@ static int __fa_zio_sysfs_get(struct __fmcadc_dev_zio *fa, char *name,
* They manage both strings and integers
*/
int
fmcadc_zio_set_param
(
struct
fmcadc_dev
*
dev
,
char
*
name
,
char
*
sptr
,
int
*
iptr
)
char
*
sptr
,
int
*
iptr
)
{
struct
__fmcadc_dev_zio
*
fa
=
to_dev_zio
(
dev
);
char
istr
[
12
];
...
...
@@ -89,7 +89,7 @@ int fmcadc_zio_set_param(struct fmcadc_dev *dev, char *name,
}
int
fmcadc_zio_get_param
(
struct
fmcadc_dev
*
dev
,
char
*
name
,
char
*
sptr
,
int
*
iptr
)
char
*
sptr
,
int
*
iptr
)
{
struct
__fmcadc_dev_zio
*
fa
=
to_dev_zio
(
dev
);
char
istr
[
12
];
...
...
@@ -328,17 +328,17 @@ static int fmcadc_zio_config(struct __fmcadc_dev_zio *fa, unsigned int flags,
{
int
err
,
i
;
uint32_t
trg_
enabled
;
uint32_t
enabled
;
err
=
fa_zio_sysfs_get
(
fa
,
"cset0/trigger/enable"
,
&
trg_
enabled
);
err
=
fa_zio_sysfs_get
(
fa
,
"cset0/trigger/enable"
,
&
enabled
);
if
(
err
)
return
err
;
if
(
trg_
enabled
)
{
if
(
enabled
)
{
/* disable the trigger before changing config */
trg_
enabled
=
0
;
err
=
fa_zio_sysfs_set
(
fa
,
"cset0/trigger/enable"
,
&
trg_
enabled
);
enabled
=
0
;
err
=
fa_zio_sysfs_set
(
fa
,
"cset0/trigger/enable"
,
&
enabled
);
/* restore the initial value */
trg_
enabled
=
1
;
enabled
=
1
;
}
for
(
i
=
0
;
i
<
__FMCADC_CONF_LEN
;
++
i
)
{
...
...
@@ -373,13 +373,12 @@ static int fmcadc_zio_config(struct __fmcadc_dev_zio *fa, unsigned int flags,
return
-
1
;
}
if
(
err
)
return
err
;
break
;
/* stop the config process: an error occurs */
}
/* if the trigger was enabled restore it */
if
(
trg_enabled
)
err
=
fa_zio_sysfs_set
(
fa
,
"cset0/trigger/enable"
,
&
trg_enabled
);
/* if the trigger was enabled restore it */
if
(
enabled
)
err
|=
fa_zio_sysfs_set
(
fa
,
"cset0/trigger/enable"
,
&
enabled
);
return
err
;
}
...
...
lib/fmc-adc-100m14b4cha.c
View file @
ad3e941e
...
...
@@ -41,7 +41,7 @@ static int fmcadc_flush_input(struct __fmcadc_dev_zio *fa)
int
i
;
/* Read the control until one is there; data is discarded by zio */
while
(
1
)
{
while
(
1
)
{
i
=
poll
(
&
p
,
1
,
0
);
if
(
i
<
0
)
return
-
1
;
...
...
@@ -150,7 +150,7 @@ int fmcadc_zio_acq_poll(struct fmcadc_dev *dev,
else
to_ms
=
to
->
tv_sec
/
1000
+
(
to
->
tv_usec
+
500
)
/
1000
;
ret
=
poll
(
&
p
,
1
,
to_ms
);
switch
(
ret
)
{
switch
(
ret
)
{
case
0
:
errno
=
EAGAIN
;
/* fall through */
...
...
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