Skip to content
Unverified Commit 5c74c9d3 authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown
Browse files

ASoC: soc-core: Fix regression causing sysfs entries to disappear

The allocation order of things in soc_new_pcm_runtime was changed to
move the device_register before the allocation of the rtd structure.
This was to allow the rtd allocation to be managed by devm. However
currently the sysfs entries are added by device_register and their
visibility depends on variables within the rtd structure, this causes
the pmdown_time and dapm_widgets sysfs entries to be missing for all
rtds.

Correct this issue by manually calling device_add_groups after the
appropriate information is available.

Fixes: d918a376

 ("ASoC: soc-core: tidyup soc_new_pcm_runtime() alloc order")
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200730120715.637-1-ckeepax@opensource.cirrus.com
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent dc5fb6d2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment