mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
tracing: Pass export pointer as argument to ->write()
By passing an export descriptor to the write function, users don't need to keep a global static pointer and can rely on container_of() to fetch their own structure. Link: http://lkml.kernel.org/r/[email protected] Acked-by: Steven Rostedt (VMware) <[email protected]> Reviewed-by: Chunyan Zhang <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
This commit is contained in:
parent
c4bfd39d7f
commit
a773d41927
3 changed files with 6 additions and 4 deletions
|
|
@ -42,9 +42,11 @@ static struct stm_ftrace {
|
|||
* @len: length of the data packet
|
||||
*/
|
||||
static void notrace
|
||||
stm_ftrace_write(const void *buf, unsigned int len)
|
||||
stm_ftrace_write(struct trace_export *export, const void *buf, unsigned int len)
|
||||
{
|
||||
stm_source_write(&stm_ftrace.data, STM_FTRACE_CHAN, buf, len);
|
||||
struct stm_ftrace *stm = container_of(export, struct stm_ftrace, ftrace);
|
||||
|
||||
stm_source_write(&stm->data, STM_FTRACE_CHAN, buf, len);
|
||||
}
|
||||
|
||||
static int stm_ftrace_link(struct stm_source_data *data)
|
||||
|
|
|
|||
Loading…
Reference in a new issue