Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
222debb2
Commit
222debb2
authored
Aug 08, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] W1: fix some improper '{' style code.
Signed-off-by:
Greg Kroah-Hartman
<
greg@kroah.com
>
parent
7c82709d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
26 deletions
+13
-26
drivers/w1/ds_w1_bridge.c
drivers/w1/ds_w1_bridge.c
+2
-4
drivers/w1/dscore.c
drivers/w1/dscore.c
+5
-10
drivers/w1/w1.c
drivers/w1/w1.c
+2
-4
drivers/w1/w1_io.c
drivers/w1/w1_io.c
+2
-4
drivers/w1/w1_therm.c
drivers/w1/w1_therm.c
+2
-4
No files found.
drivers/w1/ds_w1_bridge.c
View file @
222debb2
...
...
@@ -122,15 +122,13 @@ static int __devinit ds_w1_init(void)
int
err
;
ds_bus_master
=
kmalloc
(
sizeof
(
*
ds_bus_master
),
GFP_KERNEL
);
if
(
!
ds_bus_master
)
{
if
(
!
ds_bus_master
)
{
printk
(
KERN_ERR
"Failed to allocate DS9490R USB<->W1 bus_master structure.
\n
"
);
return
-
ENOMEM
;
}
ds_dev
=
ds_get_device
();
if
(
!
ds_dev
)
{
if
(
!
ds_dev
)
{
printk
(
KERN_ERR
"DS9490R is not registered.
\n
"
);
err
=
-
ENODEV
;
goto
err_out_free_bus_master
;
...
...
drivers/w1/dscore.c
View file @
222debb2
...
...
@@ -164,8 +164,7 @@ int ds_recv_status(struct ds_device *dev, struct ds_status *st)
printk
(
"%02x "
,
buf
[
i
]);
printk
(
"
\n
"
);
if
(
count
>=
16
)
{
if
(
count
>=
16
)
{
ds_dump_status
(
buf
,
"enable flag"
,
0
);
ds_dump_status
(
buf
,
"1-wire speed"
,
1
);
ds_dump_status
(
buf
,
"strong pullup duration"
,
2
);
...
...
@@ -186,8 +185,7 @@ int ds_recv_status(struct ds_device *dev, struct ds_status *st)
memcpy
(
st
,
buf
,
sizeof
(
*
st
));
if
(
st
->
status
&
ST_EPOF
)
{
if
(
st
->
status
&
ST_EPOF
)
{
printk
(
KERN_INFO
"Resetting device after ST_EPOF.
\n
"
);
err
=
ds_send_control_cmd
(
dev
,
CTL_RESET_DEVICE
,
0
);
if
(
err
)
...
...
@@ -197,8 +195,7 @@ int ds_recv_status(struct ds_device *dev, struct ds_status *st)
return
err
;
}
#if 0
if (st->status & ST_IDLE)
{
if (st->status & ST_IDLE) {
printk(KERN_INFO "Resetting pulse after ST_IDLE.\n");
err = ds_start_pulse(dev, PULLUP_PULSE_DURATION);
if (err)
...
...
@@ -311,8 +308,7 @@ int ds_wait_status(struct ds_device *dev, struct ds_status *st)
do
{
err
=
ds_recv_status_nodump
(
dev
,
st
,
buf
,
sizeof
(
buf
));
#if 0
if (err >= 0)
{
if (err >= 0) {
int i;
printk("0x%x: count=%d, status: ", dev->ep[EP_STATUS], err);
for (i=0; i<err; ++i)
...
...
@@ -343,8 +339,7 @@ int ds_reset(struct ds_device *dev, struct ds_status *st)
ds_wait_status
(
dev
,
st
);
#if 0
if (st->command_buffer_status)
{
if (st->command_buffer_status) {
printk(KERN_INFO "Short circuit.\n");
return -EIO;
}
...
...
drivers/w1/w1.c
View file @
222debb2
...
...
@@ -556,8 +556,7 @@ static void w1_search(struct w1_master *dev)
if
(
sl
->
reg_num
.
family
==
tmp
->
family
&&
sl
->
reg_num
.
id
==
tmp
->
id
&&
sl
->
reg_num
.
crc
==
tmp
->
crc
)
{
sl
->
reg_num
.
crc
==
tmp
->
crc
)
{
set_bit
(
W1_SLAVE_ACTIVE
,
(
long
*
)
&
sl
->
flags
);
break
;
}
...
...
@@ -719,8 +718,7 @@ int w1_process(void *data)
list_for_each_safe
(
ent
,
n
,
&
dev
->
slist
)
{
sl
=
list_entry
(
ent
,
struct
w1_slave
,
w1_slave_entry
);
if
(
sl
&&
!
test_bit
(
W1_SLAVE_ACTIVE
,
(
unsigned
long
*
)
&
sl
->
flags
))
{
if
(
sl
&&
!
test_bit
(
W1_SLAVE_ACTIVE
,
(
unsigned
long
*
)
&
sl
->
flags
))
{
list_del
(
&
sl
->
w1_slave_entry
);
w1_slave_detach
(
sl
);
...
...
drivers/w1/w1_io.c
View file @
222debb2
...
...
@@ -136,8 +136,7 @@ u8 w1_read_block(struct w1_master *dev, u8 *buf, int len)
if
(
dev
->
bus_master
->
read_block
)
ret
=
dev
->
bus_master
->
read_block
(
dev
->
bus_master
->
data
,
buf
,
len
);
else
{
else
{
for
(
i
=
0
;
i
<
len
;
++
i
)
buf
[
i
]
=
w1_read_8
(
dev
);
ret
=
len
;
...
...
@@ -152,8 +151,7 @@ int w1_reset_bus(struct w1_master *dev)
if
(
dev
->
bus_master
->
reset_bus
)
result
=
dev
->
bus_master
->
reset_bus
(
dev
->
bus_master
->
data
)
&
0x1
;
else
{
else
{
dev
->
bus_master
->
write_bit
(
dev
->
bus_master
->
data
,
0
);
w1_delay
(
480
);
dev
->
bus_master
->
write_bit
(
dev
->
bus_master
->
data
,
1
);
...
...
drivers/w1/w1_therm.c
View file @
222debb2
...
...
@@ -116,8 +116,7 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si
verdict
=
0
;
crc
=
0
;
while
(
max_trying
--
)
{
while
(
max_trying
--
)
{
if
(
!
w1_reset_bus
(
dev
))
{
int
count
=
0
;
u8
match
[
9
]
=
{
W1_MATCH_ROM
,
};
...
...
@@ -133,8 +132,7 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si
w1_write_block
(
dev
,
match
,
9
);
w1_write_8
(
dev
,
W1_READ_SCRATCHPAD
);
if
((
count
=
w1_read_block
(
dev
,
rom
,
9
))
!=
9
)
{
if
((
count
=
w1_read_block
(
dev
,
rom
,
9
))
!=
9
)
{
dev_warn
(
&
dev
->
dev
,
"w1_read_block() returned %d instead of 9.
\n
"
,
count
);
}
...
...
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