oprofile: adding cpu buffer r/w access functions
This is in preparation for changes in the cpu buffer implementation.
Signed-off-by: Robert Richter <robert.richter@amd.com>
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
index 2c4d541..7e5e650 100644
--- a/drivers/oprofile/cpu_buffer.c
+++ b/drivers/oprofile/cpu_buffer.c
@@ -168,7 +168,7 @@
add_sample(struct oprofile_cpu_buffer *cpu_buf,
unsigned long pc, unsigned long event)
{
- struct op_sample *entry = &cpu_buf->buffer[cpu_buf->head_pos];
+ struct op_sample *entry = cpu_buffer_write_entry(cpu_buf);
entry->eip = pc;
entry->event = event;
increment_head(cpu_buf);