Re: [PATCH] USB: musb: dsps: move debugfs_remove_recursive()

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

 



On 04/02/2014 06:05 PM, Felipe Balbi wrote:
> On Wed, Apr 02, 2014 at 11:46:51AM +0200, Daniel Mack wrote:

>> diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
>> index 3372ded..e2fd263 100644
>> --- a/drivers/usb/musb/musb_dsps.c
>> +++ b/drivers/usb/musb/musb_dsps.c
>> @@ -470,8 +470,9 @@ static int dsps_musb_exit(struct musb *musb)
>>  	struct dsps_glue *glue = dev_get_drvdata(dev->parent);
>>  
>>  	del_timer_sync(&glue->timer);
>> -
>>  	usb_phy_shutdown(musb->xceiv);
>> +	debugfs_remove_recursive(glue->dbgfs_root);
>> +
>>  	return 0;
>>  }
>>  
>> @@ -708,8 +709,6 @@ static int dsps_remove(struct platform_device *pdev)
>>  	pm_runtime_put(&pdev->dev);
>>  	pm_runtime_disable(&pdev->dev);
>>  
>> -	debugfs_remove_recursive(glue->dbgfs_root);
> 
> I don't think this is the right fix. debugfs_remove_recursive is
> supposed to remove the directory as well. Why isn't dsps_musb_exit()
> called ?

dsps_musb_exit() is called, hence my fix works :) The question is rather
why dsps_remove() isn't called.

For me, the fix looked obvious, as resources that are claimed in
dsps_musb_init() should obviously be freed in its counterpart function,
dsps_musb_exit(). For reasons of readability if not for any other :)


Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux