Re: [PATCH v7 04/14] usb: chipidea: msm: add remove method

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

Hi,

On Mon, Jun 25, 2012 at 03:55:22PM +0200, Marek Vasut wrote:
> Dear ABRAHAM, KISHON VIJAY,
> 
> > Hi,
> > 
> > On Mon, Jun 25, 2012 at 7:03 PM, Marek Vasut <marex@xxxxxxx> wrote:
> > > Dear ABRAHAM, KISHON VIJAY,
> > > 
> > >> Hi,
> > >> 
> > >> On Mon, Jun 25, 2012 at 12:26 PM, Richard Zhao
> > >> 
> > >> <richard.zhao@xxxxxxxxxxxxx> wrote:
> > >> > From: Felipe Balbi <balbi@xxxxxx>
> > >> > 
> > >> > allow this driver to be removed too.
> > >> > 
> > >> > Signed-off-by: Felipe Balbi <balbi@xxxxxx>
> > >> > Signed-off-by: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
> > >> > ---
> > >> >  drivers/usb/chipidea/ci13xxx_msm.c |   20 ++++++++++++++------
> > >> >  1 file changed, 14 insertions(+), 6 deletions(-)
> > >> > 
> > >> > diff --git a/drivers/usb/chipidea/ci13xxx_msm.c
> > >> > b/drivers/usb/chipidea/ci13xxx_msm.c index 8d438b8..68512d4 100644
> > >> > --- a/drivers/usb/chipidea/ci13xxx_msm.c
> > >> > +++ b/drivers/usb/chipidea/ci13xxx_msm.c
> > >> > @@ -84,6 +84,8 @@ static int __devinit ci13xxx_msm_probe(struct
> > >> > platform_device *pdev) if (ret)
> > >> >                goto put_platform;
> > >> > 
> > >> > +       platform_set_drvdata(pdev, plat_ci);
> > >> > +
> > >> >        pm_runtime_no_callbacks(&pdev->dev);
> > >> >        pm_runtime_enable(&pdev->dev);
> > >> > 
> > >> > @@ -95,16 +97,22 @@ put_platform:
> > >> >        return ret;
> > >> >  }
> > >> > 
> > >> > +static int __devexit ci13xxx_msm_remove(struct platform_device *pdev)
> > >> > +{
> > >> > +       struct platform_device *plat_ci = platform_get_drvdata(pdev);
> > >> 
> > >> How about a pm_runtime_disable() here?
> > > 
> > > MX28 doesn't do runtime PM yet. Actually it doesn't do any PM.
> > 
> > I was probably misled by the call to pm_runtime_enable in your probe
> > 
> > :-( Then can we have it removed from probe as well?
> 
> Yes, either that or properly add runtime PM support since mxc maybe does support 
> it, I dunno right now.

I think adding pm_runtime_disable() to the exit path should be the way
to go. proper callbacks can be implemented later, but we cannot leave pm
enabled for the device.

-- 
balbi

Attachment: signature.asc
Description: Digital signature

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Follow linuxarm on Twitter