From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: broonie@kernel.org, lgirdwood@gmail.com, sbkim73@samsung.com,
Marek Szyprowski <m.szyprowski@samsung.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ASoC: samsung: i2s: Fix multiple "IIS multi" devices initialization
Date: Mon, 18 Feb 2019 12:33:40 +0100 [thread overview]
Message-ID: <8b28c8d6-c8bb-4b31-403b-023f49108e6f@samsung.com> (raw)
In-Reply-To: <CAJKOXPfF7+Qp1DLR_YJJOXH-YMQqWbxr0Hp=cKU+7mc9oKTUtA@mail.gmail.com>
On 2/18/19 12:00, Krzysztof Kozlowski wrote:
> On Fri, 15 Feb 2019 at 15:48, Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:
>> diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
>> index e36c44e2f1bb..4a6dd86459bc 100644
>> --- a/sound/soc/samsung/i2s.c
>> +++ b/sound/soc/samsung/i2s.c
>> @@ -1339,20 +1339,34 @@ static int i2s_register_clock_provider(struct samsung_i2s_priv *priv)
>> /* Create platform device for the secondary PCM */
>> static int i2s_create_secondary_device(struct samsung_i2s_priv *priv)
>> {
[...]
>> + ret = platform_device_add(pdev_sec);
>> if (ret < 0) {
>> - dev_info(&pdev->dev, "device_attach() failed\n");
>> + platform_device_put(pdev_sec);
>> return ret;
>> }
>>
>> - priv->pdev_sec = pdev;
>> + priv->pdev_sec = pdev_sec;
>> +
>> + ret = device_attach(&pdev_sec->dev);
>> + if (ret < 0) {
>> + dev_info(&pdev_sec->dev, "device_attach() failed\n");
>
> Don't you need here platform_device_unregister()?
It's in i2s_delete_secondary_device(), but it might be better
indeed to add it here and move the priv->pdev_sec assignment
to the end making it a last step.
--
Thanks,
Sylwester
next prev parent reply other threads:[~2019-02-18 11:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190215144822epcas2p4a6187a4e4d45c7ac3ea067ac428b3678@epcas2p4.samsung.com>
2019-02-15 14:48 ` [PATCH 1/2] ASoC: samsung: i2s: Fix the secondary platform device registration Sylwester Nawrocki
[not found] ` <CGME20190215144828epcas2p267aae592d0ebaaaa297ba1543463c204@epcas2p2.samsung.com>
2019-02-15 14:48 ` [PATCH 2/2] ASoC: samsung: i2s: Fix multiple "IIS multi" devices initialization Sylwester Nawrocki
2019-02-18 11:00 ` Krzysztof Kozlowski
2019-02-18 11:33 ` Sylwester Nawrocki [this message]
2019-02-18 11:17 ` Krzysztof Kozlowski
2019-02-18 8:31 ` [PATCH 1/2] ASoC: samsung: i2s: Fix the secondary platform device registration Krzysztof Kozlowski
2019-02-18 11:41 ` Sylwester Nawrocki
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=8b28c8d6-c8bb-4b31-403b-023f49108e6f@samsung.com \
--to=s.nawrocki@samsung.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=krzk@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=sbkim73@samsung.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
all inboxes | Powered by JetHome®