aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/connector/cn_proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/connector/cn_proc.c')
-rw-r--r--drivers/connector/cn_proc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c
index a7f046b0096c..2b46a7efa0ac 100644
--- a/drivers/connector/cn_proc.c
+++ b/drivers/connector/cn_proc.c
@@ -43,9 +43,10 @@ static DEFINE_PER_CPU(__u32, proc_event_counts) = { 0 };
43 43
44static inline void get_seq(__u32 *ts, int *cpu) 44static inline void get_seq(__u32 *ts, int *cpu)
45{ 45{
46 *ts = get_cpu_var(proc_event_counts)++; 46 preempt_disable();
47 *ts = __this_cpu_inc_return(proc_event_counts) -1;
47 *cpu = smp_processor_id(); 48 *cpu = smp_processor_id();
48 put_cpu_var(proc_event_counts); 49 preempt_enable();
49} 50}
50 51
51void proc_fork_connector(struct task_struct *task) 52void proc_fork_connector(struct task_struct *task)