Re: [PATCH v4 15/15] usb:hsotg:samsung: Add release function for hsotg device

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

 



Hi, Domenico


> On Tue, Apr 17, 2012 at 09:22:11AM +0200, Lukasz Majewski wrote:
> > Add release function to prevent kernel warning.
> > Kfree is performed when all references are gone.
> > 
> > Signed-off-by: Sangwook Lee <sangwook.lee@xxxxxxxxxx>
> > Signed-off-by: Lukasz Majewski <l.majewski@xxxxxxxxxxx>
> > Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
> > ---
> >  drivers/usb/gadget/s3c-hsotg.c |   14 +++++++++++++-
> >  1 files changed, 13 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/usb/gadget/s3c-hsotg.c
> > b/drivers/usb/gadget/s3c-hsotg.c index 34e61b3..eb78044 100644
> > --- a/drivers/usb/gadget/s3c-hsotg.c
> > +++ b/drivers/usb/gadget/s3c-hsotg.c
> > @@ -3531,6 +3543,7 @@ static int __devinit s3c_hsotg_probe(struct
> > platform_device *pdev) 
> >  	hsotg->gadget.dev.parent = dev;
> >  	hsotg->gadget.dev.dma_mask = dev->dma_mask;
> > +	hsotg->gadget.dev.release = s3c_hsotg_release;
> >  
> >  	/* reset the system */
> >  
> > @@ -3679,7 +3692,6 @@ static int __devexit s3c_hsotg_remove(struct
> > platform_device *pdev) clk_put(hsotg->clk);
> >  
> 
> I think I can see a missing clk_unprepare() right under the hunk... :)
> 
> Yep, you need to add the new clk_prepare/clk_unprepare calls.
> clk_prepare_enable() and clk_disable_unprepare() are your friends.

Thank you for review. I will change this accordingly.

-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center
Platform Group
--
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