lkml.org 
[lkml]   [2019]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] ASoC: samsung: i2s: Fix multiple "IIS multi" devices initialization
From
Date
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

\
 
 \ /
  Last update: 2019-02-18 12:34    [W:0.045 / U:4.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site