summaryrefslogtreecommitdiff
path: root/drivers/oprofile/buffer_sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/oprofile/buffer_sync.c')
-rw-r--r--drivers/oprofile/buffer_sync.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
index b2e8e49c8659..43e521e99126 100644
--- a/drivers/oprofile/buffer_sync.c
+++ b/drivers/oprofile/buffer_sync.c
@@ -108,10 +108,10 @@ static int module_load_notify(struct notifier_block * self, unsigned long val, v
return 0;
/* FIXME: should we process all CPU buffers ? */
- down(&buffer_sem);
+ mutex_lock(&buffer_mutex);
add_event_entry(ESCAPE_CODE);
add_event_entry(MODULE_LOADED_CODE);
- up(&buffer_sem);
+ mutex_unlock(&buffer_mutex);
#endif
return 0;
}
@@ -501,7 +501,7 @@ void sync_buffer(int cpu)
sync_buffer_state state = sb_buffer_start;
unsigned long available;
- down(&buffer_sem);
+ mutex_lock(&buffer_mutex);
add_cpu_switch(cpu);
@@ -550,5 +550,5 @@ void sync_buffer(int cpu)
mark_done(cpu);
- up(&buffer_sem);
+ mutex_unlock(&buffer_mutex);
}