Re: [PATCH 5/5 v4] usb: musb: Using runtime pm APIs for musb.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 10, 2010 at 6:29 PM, Felipe Balbi <balbi@xxxxxx> wrote:
> Hi,
>
> On Fri, Dec 10, 2010 at 06:23:46PM +0530, Hema HK wrote:
>>
>> @@ -429,28 +392,29 @@ static int __init omap2430_probe(struct
>>                        pdev->num_resources);
>>        if (ret) {
>>                dev_err(&pdev->dev, "failed to add resources\n");
>> -               goto err4;
>> +               goto err2;
>>        }
>>
>>        ret = platform_device_add_data(musb, pdata, sizeof(*pdata));
>>        if (ret) {
>>                dev_err(&pdev->dev, "failed to add platform_data\n");
>> -               goto err4;
>> +               goto err2;
>>        }
>>
>>        ret = platform_device_add(musb);
>>        if (ret) {
>>                dev_err(&pdev->dev, "failed to register musb device\n");
>> -               goto err4;
>> +               goto err2;
>>        }
>>
>> -       return 0;
>> +       pm_runtime_enable(&pdev->dev);
>> +       if (pm_runtime_get_sync(dev)) {
>> +               dev_err(dev, "pm_runtime_get_sync FAILED");
>> +               goto err2;
>> +       }
>
> don't you have to pm_runtime_disable() if get_sync fails ?

Yes. That is require. Otherwise next time driver load will through warning.
Thanks for pointing this out.
>
>> @@ -468,8 +432,7 @@ static int __exit omap2430_remove(struct
>>
>>        platform_device_del(glue->musb);
>>        platform_device_put(glue->musb);
>> -       clk_disable(glue->clk);
>> -       clk_put(glue->clk);
>> +       pm_runtime_put_sync(&pdev->dev);
>
> same here, don't you need to pm_runtime_disable() ??
Yes.

Regards,
Hema
>
> --
> balbi
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux