diff options
| author | Kuninori Morimoto <[email protected]> | 2019-08-20 14:04:49 +0900 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2019-08-22 18:29:26 +0100 |
| commit | 4168ddabb480bef818c93f378428632fb681b500 (patch) | |
| tree | f4bd55b286b476206babd0f04c9d54c3074315c1 /tools/perf/scripts/python/Perf-Trace-Util/lib | |
| parent | 6191cbde5ff02ef5307e7b2e4f5b8f7607c2b1df (diff) | |
ASoC: soc-core: use device_register()
It is easy to read code if it is cleanly using paired function/naming,
like start <-> stop, register <-> unregister, etc, etc.
But, current ALSA SoC code is very random, unbalance, not paired, etc.
soc-core.c is using device_unregiser(), but there is no its paired
device_regiser(). We can find its code at soc_post_component_init()
which is using device_initialize() and device_add().
Here, device_initialize() + device_add() = device_register().
-- linux/drivers/base/core.c --
int device_register(struct device *dev)
{
device_initialize(dev);
return device_add(dev);
}
device_initialize() is doing each dev member's initialization only,
not related to device parent/release/groups.
Thus, we can postpone it.
let's use device_register() instead of device_initialize()/device_add().
Signed-off-by: Kuninori Morimoto <[email protected]>
Reviewed-by: Ranjani Sridharan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib')
0 files changed, 0 insertions, 0 deletions