Re: [PATCH 1/2] input: Add Qualcomm PM8941 power key driver

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

 




On Tue, Oct 07, 2014 at 04:30:46PM -0700, Bjorn Andersson wrote:
> On Tue 07 Oct 02:54 PDT 2014, Kiran Padwal wrote:
> 
> > On Tuesday 07 October 2014 06:42 AM, Bjorn Andersson wrote:
> > > From: Courtney Cavin <courtney.cavin@xxxxxxxxxxxxxx>
> > > 
> > > Signed-off-by: Courtney Cavin <courtney.cavin@xxxxxxxxxxxxxx>
> > > Signed-off-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxxxxxx>
> > > ---
> > >  drivers/input/misc/Kconfig         |   12 +++
> > >  drivers/input/misc/Makefile        |    1 +
> > >  drivers/input/misc/pm8941-pwrkey.c |  196 ++++++++++++++++++++++++++++++++++++
> > 
> > <snip>
> > 
> > > +
> > > +	platform_set_drvdata(pdev, pwrkey);
> > > +	device_init_wakeup(&pdev->dev, 1);
> > > +
> > > +	return 0;
> > > +}
> > > +
> > > +static int pm8941_pwrkey_remove(struct platform_device *pdev)
> > > +{
> > > +	device_init_wakeup(&pdev->dev, 0);
> > 
> > Shouldn't we unregister input device?
> > 
> 
> It's allocated with devm_input_allocate_device() so I assumed that it goes away
> upon the device being removed. Looking at input_register_device() seems to
> confirm that.

Yes, devices allocated with devm_input_allocate_device() will be
unregistered and freed automatically.

Thanks.

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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux