alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	patches@opensource.wolfsonmicro.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ASoC: wm9713: fix regmap free path
Date: Tue, 23 Feb 2016 15:04:01 +0100	[thread overview]
Message-ID: <56CC66D1.7010702@metafoo.de> (raw)
In-Reply-To: <20160223140002.GE1490@localhost.localdomain>

On 02/23/2016 03:00 PM, Charles Keepax wrote:
> On Mon, Feb 22, 2016 at 11:35:44PM +0100, Robert Jarzmik wrote:
>> In the conversion to regmap, I assumed that the devm_() variant could be
>> used in the soc probe function.
>>
>> As a mater of fact with the current code the regmap is freed twice
>> because of the devm_() call:
>> (mutex_lock) from [<c01f6624>] (debugfs_remove_recursive+0x50/0x1d0)
>> (debugfs_remove_recursive) from [<c02bf800>] (regmap_debugfs_exit+0x1c/0xd4)
>> (regmap_debugfs_exit) from [<c02ba1f8>] (regmap_exit+0x28/0xc8)
>> (regmap_exit) from [<c02aa258>] (release_nodes+0x18c/0x204)
>> (release_nodes) from [<c02a278c>] (device_release+0x18/0x90)
>> (device_release) from [<c0239030>] (kobject_release+0x90/0x1bc)
>> (kobject_release) from [<c0395c94>] (wm9713_soc_remove+0x1c/0x24)
>> (wm9713_soc_remove) from [<c0384884>] (soc_remove_component+0x50/0x7c)
>> (soc_remove_component) from [<c0386c28>] (soc_remove_dai_links+0x118/0x228)
>> (soc_remove_dai_links) from [<c038721c>] (snd_soc_register_card+0x4e4/0xdd4)
>> (snd_soc_register_card) from [<c0393c54>] (devm_snd_soc_register_card+0x34/0x70)
>>
>> Fix this by replacing the devm_regmap initialization code with the non
>> devm_() variant.
>>
>> Fixes: 700dadfefc3d ASoC: wm9713: convert to regmap
>> Cc: Lars-Peter Clausen <lars@metafoo.de>
>> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
>> ---
> 
> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> 
> I am totally happy for this patch to be merged but would it not
> be prefferable to do the regmap init in the device probe and
> still use the devm_ call?  Doing the regmap setup in the ASoC
> probe is a little unusual and I don't really see any reason why
> it is necessary here. Unless I am missing something?

It's AC97... there is just no proper device model integration for AC97 at
the moment.

  reply	other threads:[~2016-02-23 14:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 22:35 [PATCH v2] ASoC: wm9713: fix regmap free path Robert Jarzmik
2016-02-23 14:00 ` Charles Keepax
2016-02-23 14:04   ` Lars-Peter Clausen [this message]
2016-02-24  3:53 ` Applied "ASoC: wm9713: fix regmap free path" to the asoc tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2016-02-20 19:44 [PATCH v2] ASoC: wm9713: fix regmap free path Robert Jarzmik
2016-02-21 10:12 ` Lars-Peter Clausen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56CC66D1.7010702@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=perex@perex.cz \
    --cc=robert.jarzmik@free.fr \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).