summaryrefslogtreecommitdiff
path: root/drivers/net/ks8851.h
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2011-08-11 11:31:20 (GMT)
committerIngo Molnar <mingo@elte.hu>2011-08-14 09:53:05 (GMT)
commit7e5b2a01d2ca2eae4ef913b59f84341f9a70e206 (patch)
treee5578bace8c56afd14246208a9e21ed45e4328b7 /drivers/net/ks8851.h
parent144060fee07e9c22e179d00819c83c86fbcbf82c (diff)
downloadlinux-fsl-qoriq-7e5b2a01d2ca2eae4ef913b59f84341f9a70e206.tar.xz
perf: provide PMU when initing events
Currently, an event's 'pmu' field is set after pmu::event_init() is called. This means that pmu::event_init() must figure out which struct pmu the event was initialised from. This makes it difficult to consolidate common event initialisation code for similar PMUs, and very difficult to implement drivers for PMUs which can have multiple instances (e.g. a USB controller PMU, a GPU PMU, etc). This patch sets the 'pmu' field before initialising the event, allowing event init code to identify the struct pmu instance easily. In the event of failure to initialise an event, the event is destroyed via kfree() without calling perf_event::destroy(), so this shouldn't result in bad behaviour even if the destroy field was set before failure to initialise was noted. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1313062280-19123-1-git-send-email-mark.rutland@arm.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/net/ks8851.h')
0 files changed, 0 insertions, 0 deletions