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
b9dcde6e
Commit
b9dcde6e
authored
Mar 04, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/gregkh/linux/w1-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
a9938579
3de7cc99
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
56 deletions
+38
-56
drivers/w1/dscore.c
drivers/w1/dscore.c
+14
-13
drivers/w1/dscore.h
drivers/w1/dscore.h
+0
-3
drivers/w1/matrox_w1.c
drivers/w1/matrox_w1.c
+1
-1
drivers/w1/w1.c
drivers/w1/w1.c
+15
-26
drivers/w1/w1.h
drivers/w1/w1.h
+0
-1
drivers/w1/w1_family.c
drivers/w1/w1_family.c
+2
-2
drivers/w1/w1_int.c
drivers/w1/w1_int.c
+0
-4
drivers/w1/w1_therm.c
drivers/w1/w1_therm.c
+6
-6
No files found.
drivers/w1/dscore.c
View file @
b9dcde6e
...
@@ -45,9 +45,6 @@ int ds_set_speed(struct ds_device *, int);
...
@@ -45,9 +45,6 @@ int ds_set_speed(struct ds_device *, int);
int
ds_reset
(
struct
ds_device
*
,
struct
ds_status
*
);
int
ds_reset
(
struct
ds_device
*
,
struct
ds_status
*
);
int
ds_detect
(
struct
ds_device
*
,
struct
ds_status
*
);
int
ds_detect
(
struct
ds_device
*
,
struct
ds_status
*
);
int
ds_stop_pulse
(
struct
ds_device
*
,
int
);
int
ds_stop_pulse
(
struct
ds_device
*
,
int
);
int
ds_send_data
(
struct
ds_device
*
,
unsigned
char
*
,
int
);
int
ds_recv_data
(
struct
ds_device
*
,
unsigned
char
*
,
int
);
int
ds_recv_status
(
struct
ds_device
*
,
struct
ds_status
*
);
struct
ds_device
*
ds_get_device
(
void
);
struct
ds_device
*
ds_get_device
(
void
);
void
ds_put_device
(
struct
ds_device
*
);
void
ds_put_device
(
struct
ds_device
*
);
...
@@ -148,7 +145,7 @@ int ds_recv_status_nodump(struct ds_device *dev, struct ds_status *st, unsigned
...
@@ -148,7 +145,7 @@ int ds_recv_status_nodump(struct ds_device *dev, struct ds_status *st, unsigned
return
count
;
return
count
;
}
}
int
ds_recv_status
(
struct
ds_device
*
dev
,
struct
ds_status
*
st
)
static
int
ds_recv_status
(
struct
ds_device
*
dev
,
struct
ds_status
*
st
)
{
{
unsigned
char
buf
[
64
];
unsigned
char
buf
[
64
];
int
count
,
err
=
0
,
i
;
int
count
,
err
=
0
,
i
;
...
@@ -206,7 +203,7 @@ int ds_recv_status(struct ds_device *dev, struct ds_status *st)
...
@@ -206,7 +203,7 @@ int ds_recv_status(struct ds_device *dev, struct ds_status *st)
return
err
;
return
err
;
}
}
int
ds_recv_data
(
struct
ds_device
*
dev
,
unsigned
char
*
buf
,
int
size
)
static
int
ds_recv_data
(
struct
ds_device
*
dev
,
unsigned
char
*
buf
,
int
size
)
{
{
int
count
,
err
;
int
count
,
err
;
struct
ds_status
st
;
struct
ds_status
st
;
...
@@ -234,7 +231,7 @@ int ds_recv_data(struct ds_device *dev, unsigned char *buf, int size)
...
@@ -234,7 +231,7 @@ int ds_recv_data(struct ds_device *dev, unsigned char *buf, int size)
return
count
;
return
count
;
}
}
int
ds_send_data
(
struct
ds_device
*
dev
,
unsigned
char
*
buf
,
int
len
)
static
int
ds_send_data
(
struct
ds_device
*
dev
,
unsigned
char
*
buf
,
int
len
)
{
{
int
count
,
err
;
int
count
,
err
;
...
@@ -774,15 +771,19 @@ EXPORT_SYMBOL(ds_read_block);
...
@@ -774,15 +771,19 @@ EXPORT_SYMBOL(ds_read_block);
EXPORT_SYMBOL
(
ds_write_byte
);
EXPORT_SYMBOL
(
ds_write_byte
);
EXPORT_SYMBOL
(
ds_write_bit
);
EXPORT_SYMBOL
(
ds_write_bit
);
EXPORT_SYMBOL
(
ds_write_block
);
EXPORT_SYMBOL
(
ds_write_block
);
EXPORT_SYMBOL
(
ds_reset
);
EXPORT_SYMBOL
(
ds_get_device
);
EXPORT_SYMBOL
(
ds_put_device
);
/*
* This functions can be used for EEPROM programming,
* when driver will be included into mainline this will
* require uncommenting.
*/
#if 0
EXPORT_SYMBOL(ds_start_pulse);
EXPORT_SYMBOL(ds_start_pulse);
EXPORT_SYMBOL(ds_set_speed);
EXPORT_SYMBOL(ds_set_speed);
EXPORT_SYMBOL
(
ds_reset
);
EXPORT_SYMBOL(ds_detect);
EXPORT_SYMBOL(ds_detect);
EXPORT_SYMBOL(ds_stop_pulse);
EXPORT_SYMBOL(ds_stop_pulse);
EXPORT_SYMBOL
(
ds_send_data
);
EXPORT_SYMBOL
(
ds_recv_data
);
EXPORT_SYMBOL
(
ds_recv_status
);
EXPORT_SYMBOL(ds_search);
EXPORT_SYMBOL(ds_search);
EXPORT_SYMBOL
(
ds_get_device
);
#endif
EXPORT_SYMBOL
(
ds_put_device
);
drivers/w1/dscore.h
View file @
b9dcde6e
...
@@ -161,9 +161,6 @@ int ds_set_speed(struct ds_device *, int);
...
@@ -161,9 +161,6 @@ int ds_set_speed(struct ds_device *, int);
int
ds_reset
(
struct
ds_device
*
,
struct
ds_status
*
);
int
ds_reset
(
struct
ds_device
*
,
struct
ds_status
*
);
int
ds_detect
(
struct
ds_device
*
,
struct
ds_status
*
);
int
ds_detect
(
struct
ds_device
*
,
struct
ds_status
*
);
int
ds_stop_pulse
(
struct
ds_device
*
,
int
);
int
ds_stop_pulse
(
struct
ds_device
*
,
int
);
int
ds_send_data
(
struct
ds_device
*
,
unsigned
char
*
,
int
);
int
ds_recv_data
(
struct
ds_device
*
,
unsigned
char
*
,
int
);
int
ds_recv_status
(
struct
ds_device
*
,
struct
ds_status
*
);
struct
ds_device
*
ds_get_device
(
void
);
struct
ds_device
*
ds_get_device
(
void
);
void
ds_put_device
(
struct
ds_device
*
);
void
ds_put_device
(
struct
ds_device
*
);
int
ds_write_block
(
struct
ds_device
*
,
u8
*
,
int
);
int
ds_write_block
(
struct
ds_device
*
,
u8
*
,
int
);
...
...
drivers/w1/matrox_w1.c
View file @
b9dcde6e
...
@@ -235,7 +235,7 @@ static void __devexit matrox_w1_remove(struct pci_dev *pdev)
...
@@ -235,7 +235,7 @@ static void __devexit matrox_w1_remove(struct pci_dev *pdev)
static
int
__init
matrox_w1_init
(
void
)
static
int
__init
matrox_w1_init
(
void
)
{
{
return
pci_
module_init
(
&
matrox_w1_pci_driver
);
return
pci_
register_driver
(
&
matrox_w1_pci_driver
);
}
}
static
void
__exit
matrox_w1_fini
(
void
)
static
void
__exit
matrox_w1_fini
(
void
)
...
...
drivers/w1/w1.c
View file @
b9dcde6e
...
@@ -19,8 +19,6 @@
...
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
*/
#include <asm/atomic.h>
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/module.h>
...
@@ -33,6 +31,8 @@
...
@@ -33,6 +31,8 @@
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/sched.h>
#include <asm/atomic.h>
#include "w1.h"
#include "w1.h"
#include "w1_io.h"
#include "w1_io.h"
#include "w1_log.h"
#include "w1_log.h"
...
@@ -58,7 +58,6 @@ LIST_HEAD(w1_masters);
...
@@ -58,7 +58,6 @@ LIST_HEAD(w1_masters);
static
pid_t
control_thread
;
static
pid_t
control_thread
;
static
int
control_needs_exit
;
static
int
control_needs_exit
;
static
DECLARE_COMPLETION
(
w1_control_complete
);
static
DECLARE_COMPLETION
(
w1_control_complete
);
static
DECLARE_WAIT_QUEUE_HEAD
(
w1_control_wait
);
static
int
w1_master_match
(
struct
device
*
dev
,
struct
device_driver
*
drv
)
static
int
w1_master_match
(
struct
device
*
dev
,
struct
device_driver
*
drv
)
{
{
...
@@ -100,7 +99,7 @@ static ssize_t w1_default_read_bin(struct kobject *kobj, char *buf, loff_t off,
...
@@ -100,7 +99,7 @@ static ssize_t w1_default_read_bin(struct kobject *kobj, char *buf, loff_t off,
return
sprintf
(
buf
,
"No family registered.
\n
"
);
return
sprintf
(
buf
,
"No family registered.
\n
"
);
}
}
struct
bus_type
w1_bus_type
=
{
st
atic
st
ruct
bus_type
w1_bus_type
=
{
.
name
=
"w1"
,
.
name
=
"w1"
,
.
match
=
w1_master_match
,
.
match
=
w1_master_match
,
};
};
...
@@ -138,7 +137,7 @@ static struct device_attribute w1_slave_attribute_val = {
...
@@ -138,7 +137,7 @@ static struct device_attribute w1_slave_attribute_val = {
.
show
=
&
w1_default_read_name
,
.
show
=
&
w1_default_read_name
,
};
};
ssize_t
w1_master_attribute_show_name
(
struct
device
*
dev
,
char
*
buf
)
s
tatic
s
size_t
w1_master_attribute_show_name
(
struct
device
*
dev
,
char
*
buf
)
{
{
struct
w1_master
*
md
=
container_of
(
dev
,
struct
w1_master
,
dev
);
struct
w1_master
*
md
=
container_of
(
dev
,
struct
w1_master
,
dev
);
ssize_t
count
;
ssize_t
count
;
...
@@ -153,7 +152,7 @@ ssize_t w1_master_attribute_show_name(struct device *dev, char *buf)
...
@@ -153,7 +152,7 @@ ssize_t w1_master_attribute_show_name(struct device *dev, char *buf)
return
count
;
return
count
;
}
}
ssize_t
w1_master_attribute_show_pointer
(
struct
device
*
dev
,
char
*
buf
)
s
tatic
s
size_t
w1_master_attribute_show_pointer
(
struct
device
*
dev
,
char
*
buf
)
{
{
struct
w1_master
*
md
=
container_of
(
dev
,
struct
w1_master
,
dev
);
struct
w1_master
*
md
=
container_of
(
dev
,
struct
w1_master
,
dev
);
ssize_t
count
;
ssize_t
count
;
...
@@ -167,14 +166,14 @@ ssize_t w1_master_attribute_show_pointer(struct device *dev, char *buf)
...
@@ -167,14 +166,14 @@ ssize_t w1_master_attribute_show_pointer(struct device *dev, char *buf)
return
count
;
return
count
;
}
}
ssize_t
w1_master_attribute_show_timeout
(
struct
device
*
dev
,
char
*
buf
)
s
tatic
s
size_t
w1_master_attribute_show_timeout
(
struct
device
*
dev
,
char
*
buf
)
{
{
ssize_t
count
;
ssize_t
count
;
count
=
sprintf
(
buf
,
"%d
\n
"
,
w1_timeout
);
count
=
sprintf
(
buf
,
"%d
\n
"
,
w1_timeout
);
return
count
;
return
count
;
}
}
ssize_t
w1_master_attribute_show_max_slave_count
(
struct
device
*
dev
,
char
*
buf
)
s
tatic
s
size_t
w1_master_attribute_show_max_slave_count
(
struct
device
*
dev
,
char
*
buf
)
{
{
struct
w1_master
*
md
=
container_of
(
dev
,
struct
w1_master
,
dev
);
struct
w1_master
*
md
=
container_of
(
dev
,
struct
w1_master
,
dev
);
ssize_t
count
;
ssize_t
count
;
...
@@ -188,7 +187,7 @@ ssize_t w1_master_attribute_show_max_slave_count(struct device *dev, char *buf)
...
@@ -188,7 +187,7 @@ ssize_t w1_master_attribute_show_max_slave_count(struct device *dev, char *buf)
return
count
;
return
count
;
}
}
ssize_t
w1_master_attribute_show_attempts
(
struct
device
*
dev
,
char
*
buf
)
s
tatic
s
size_t
w1_master_attribute_show_attempts
(
struct
device
*
dev
,
char
*
buf
)
{
{
struct
w1_master
*
md
=
container_of
(
dev
,
struct
w1_master
,
dev
);
struct
w1_master
*
md
=
container_of
(
dev
,
struct
w1_master
,
dev
);
ssize_t
count
;
ssize_t
count
;
...
@@ -202,7 +201,7 @@ ssize_t w1_master_attribute_show_attempts(struct device *dev, char *buf)
...
@@ -202,7 +201,7 @@ ssize_t w1_master_attribute_show_attempts(struct device *dev, char *buf)
return
count
;
return
count
;
}
}
ssize_t
w1_master_attribute_show_slave_count
(
struct
device
*
dev
,
char
*
buf
)
s
tatic
s
size_t
w1_master_attribute_show_slave_count
(
struct
device
*
dev
,
char
*
buf
)
{
{
struct
w1_master
*
md
=
container_of
(
dev
,
struct
w1_master
,
dev
);
struct
w1_master
*
md
=
container_of
(
dev
,
struct
w1_master
,
dev
);
ssize_t
count
;
ssize_t
count
;
...
@@ -216,7 +215,7 @@ ssize_t w1_master_attribute_show_slave_count(struct device *dev, char *buf)
...
@@ -216,7 +215,7 @@ ssize_t w1_master_attribute_show_slave_count(struct device *dev, char *buf)
return
count
;
return
count
;
}
}
ssize_t
w1_master_attribute_show_slaves
(
struct
device
*
dev
,
char
*
buf
)
s
tatic
s
size_t
w1_master_attribute_show_slaves
(
struct
device
*
dev
,
char
*
buf
)
{
{
struct
w1_master
*
md
=
container_of
(
dev
,
struct
w1_master
,
dev
);
struct
w1_master
*
md
=
container_of
(
dev
,
struct
w1_master
,
dev
);
...
@@ -649,7 +648,7 @@ int w1_control(void *data)
...
@@ -649,7 +648,7 @@ int w1_control(void *data)
struct
w1_slave
*
sl
;
struct
w1_slave
*
sl
;
struct
w1_master
*
dev
;
struct
w1_master
*
dev
;
struct
list_head
*
ent
,
*
ment
,
*
n
,
*
mn
;
struct
list_head
*
ent
,
*
ment
,
*
n
,
*
mn
;
int
err
,
have_to_wait
=
0
,
timeout
;
int
err
,
have_to_wait
=
0
;
daemonize
(
"w1_control"
);
daemonize
(
"w1_control"
);
allow_signal
(
SIGTERM
);
allow_signal
(
SIGTERM
);
...
@@ -657,11 +656,8 @@ int w1_control(void *data)
...
@@ -657,11 +656,8 @@ int w1_control(void *data)
while
(
!
control_needs_exit
||
have_to_wait
)
{
while
(
!
control_needs_exit
||
have_to_wait
)
{
have_to_wait
=
0
;
have_to_wait
=
0
;
timeout
=
w1_timeout
*
HZ
;
do
{
timeout
=
interruptible_sleep_on_timeout
(
&
w1_control_wait
,
timeout
);
try_to_freeze
(
PF_FREEZE
);
try_to_freeze
(
PF_FREEZE
);
}
while
(
!
signal_pending
(
current
)
&&
(
timeout
>
0
)
);
msleep_interruptible
(
w1_timeout
*
1000
);
if
(
signal_pending
(
current
))
if
(
signal_pending
(
current
))
flush_signals
(
current
);
flush_signals
(
current
);
...
@@ -721,7 +717,6 @@ int w1_control(void *data)
...
@@ -721,7 +717,6 @@ int w1_control(void *data)
int
w1_process
(
void
*
data
)
int
w1_process
(
void
*
data
)
{
{
struct
w1_master
*
dev
=
(
struct
w1_master
*
)
data
;
struct
w1_master
*
dev
=
(
struct
w1_master
*
)
data
;
unsigned
long
timeout
;
struct
list_head
*
ent
,
*
n
;
struct
list_head
*
ent
,
*
n
;
struct
w1_slave
*
sl
;
struct
w1_slave
*
sl
;
...
@@ -729,11 +724,8 @@ int w1_process(void *data)
...
@@ -729,11 +724,8 @@ int w1_process(void *data)
allow_signal
(
SIGTERM
);
allow_signal
(
SIGTERM
);
while
(
!
dev
->
need_exit
)
{
while
(
!
dev
->
need_exit
)
{
timeout
=
w1_timeout
*
HZ
;
do
{
timeout
=
interruptible_sleep_on_timeout
(
&
dev
->
kwait
,
timeout
);
try_to_freeze
(
PF_FREEZE
);
try_to_freeze
(
PF_FREEZE
);
}
while
(
!
signal_pending
(
current
)
&&
(
timeout
>
0
)
);
msleep_interruptible
(
w1_timeout
*
1000
);
if
(
signal_pending
(
current
))
if
(
signal_pending
(
current
))
flush_signals
(
current
);
flush_signals
(
current
);
...
@@ -839,6 +831,3 @@ void w1_fini(void)
...
@@ -839,6 +831,3 @@ void w1_fini(void)
module_init
(
w1_init
);
module_init
(
w1_init
);
module_exit
(
w1_fini
);
module_exit
(
w1_fini
);
EXPORT_SYMBOL
(
w1_create_master_attributes
);
EXPORT_SYMBOL
(
w1_destroy_master_attributes
);
drivers/w1/w1.h
View file @
b9dcde6e
...
@@ -115,7 +115,6 @@ struct w1_master
...
@@ -115,7 +115,6 @@ struct w1_master
int
need_exit
;
int
need_exit
;
pid_t
kpid
;
pid_t
kpid
;
wait_queue_head_t
kwait
;
struct
semaphore
mutex
;
struct
semaphore
mutex
;
struct
device_driver
*
driver
;
struct
device_driver
*
driver
;
...
...
drivers/w1/w1_family.c
View file @
b9dcde6e
...
@@ -138,13 +138,13 @@ void w1_family_get(struct w1_family *f)
...
@@ -138,13 +138,13 @@ void w1_family_get(struct w1_family *f)
void
__w1_family_get
(
struct
w1_family
*
f
)
void
__w1_family_get
(
struct
w1_family
*
f
)
{
{
smp_mb__before_atomic_inc
();
atomic_inc
(
&
f
->
refcnt
);
atomic_inc
(
&
f
->
refcnt
);
smp_mb__after_atomic_inc
();
}
}
EXPORT_SYMBOL
(
w1_family_get
);
EXPORT_SYMBOL
(
w1_family_get
);
EXPORT_SYMBOL
(
w1_family_put
);
EXPORT_SYMBOL
(
w1_family_put
);
EXPORT_SYMBOL
(
__w1_family_get
);
EXPORT_SYMBOL
(
__w1_family_put
);
EXPORT_SYMBOL
(
w1_family_registered
);
EXPORT_SYMBOL
(
w1_family_registered
);
EXPORT_SYMBOL
(
w1_unregister_family
);
EXPORT_SYMBOL
(
w1_unregister_family
);
EXPORT_SYMBOL
(
w1_register_family
);
EXPORT_SYMBOL
(
w1_register_family
);
drivers/w1/w1_int.c
View file @
b9dcde6e
...
@@ -74,7 +74,6 @@ struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
...
@@ -74,7 +74,6 @@ struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
INIT_LIST_HEAD
(
&
dev
->
slist
);
INIT_LIST_HEAD
(
&
dev
->
slist
);
init_MUTEX
(
&
dev
->
mutex
);
init_MUTEX
(
&
dev
->
mutex
);
init_waitqueue_head
(
&
dev
->
kwait
);
init_completion
(
&
dev
->
dev_released
);
init_completion
(
&
dev
->
dev_released
);
init_completion
(
&
dev
->
dev_exited
);
init_completion
(
&
dev
->
dev_exited
);
...
@@ -217,8 +216,5 @@ void w1_remove_master_device(struct w1_bus_master *bm)
...
@@ -217,8 +216,5 @@ void w1_remove_master_device(struct w1_bus_master *bm)
__w1_remove_master_device
(
dev
);
__w1_remove_master_device
(
dev
);
}
}
EXPORT_SYMBOL
(
w1_alloc_dev
);
EXPORT_SYMBOL
(
w1_free_dev
);
EXPORT_SYMBOL
(
w1_add_master_device
);
EXPORT_SYMBOL
(
w1_add_master_device
);
EXPORT_SYMBOL
(
w1_remove_master_device
);
EXPORT_SYMBOL
(
w1_remove_master_device
);
EXPORT_SYMBOL
(
__w1_remove_master_device
);
drivers/w1/w1_therm.c
View file @
b9dcde6e
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include <linux/moduleparam.h>
#include <linux/moduleparam.h>
#include <linux/device.h>
#include <linux/device.h>
#include <linux/types.h>
#include <linux/types.h>
#include <linux/delay.h>
#include "w1.h"
#include "w1.h"
#include "w1_io.h"
#include "w1_io.h"
...
@@ -103,6 +104,7 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si
...
@@ -103,6 +104,7 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si
int
i
,
max_trying
=
10
;
int
i
,
max_trying
=
10
;
atomic_inc
(
&
sl
->
refcnt
);
atomic_inc
(
&
sl
->
refcnt
);
smp_mb__after_atomic_inc
();
if
(
down_interruptible
(
&
sl
->
master
->
mutex
))
{
if
(
down_interruptible
(
&
sl
->
master
->
mutex
))
{
count
=
0
;
count
=
0
;
goto
out_dec
;
goto
out_dec
;
...
@@ -128,7 +130,7 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si
...
@@ -128,7 +130,7 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si
if
(
!
w1_reset_bus
(
dev
))
{
if
(
!
w1_reset_bus
(
dev
))
{
int
count
=
0
;
int
count
=
0
;
u8
match
[
9
]
=
{
W1_MATCH_ROM
,
};
u8
match
[
9
]
=
{
W1_MATCH_ROM
,
};
unsigned
long
tm
;
unsigned
int
tm
=
750
;
memcpy
(
&
match
[
1
],
(
u64
*
)
&
sl
->
reg_num
,
8
);
memcpy
(
&
match
[
1
],
(
u64
*
)
&
sl
->
reg_num
,
8
);
...
@@ -136,11 +138,8 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si
...
@@ -136,11 +138,8 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si
w1_write_8
(
dev
,
W1_CONVERT_TEMP
);
w1_write_8
(
dev
,
W1_CONVERT_TEMP
);
tm
=
jiffies
+
msecs_to_jiffies
(
750
);
while
(
tm
)
{
while
(
time_before
(
jiffies
,
tm
))
{
tm
=
msleep_interruptible
(
tm
);
set_current_state
(
TASK_INTERRUPTIBLE
);
schedule_timeout
(
tm
-
jiffies
);
if
(
signal_pending
(
current
))
if
(
signal_pending
(
current
))
flush_signals
(
current
);
flush_signals
(
current
);
}
}
...
@@ -181,6 +180,7 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si
...
@@ -181,6 +180,7 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si
out:
out:
up
(
&
dev
->
mutex
);
up
(
&
dev
->
mutex
);
out_dec:
out_dec:
smp_mb__before_atomic_inc
();
atomic_dec
(
&
sl
->
refcnt
);
atomic_dec
(
&
sl
->
refcnt
);
return
count
;
return
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