lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 7 Oct 2014 16:42:24 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Bjorn Andersson <bjorn.andersson@...ymobile.com>
Cc:	Kiran Padwal <kiran.padwal@...rtplayin.com>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Grant Likely <grant.likely@...aro.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
	"Cavin, Courtney" <Courtney.Cavin@...ymobile.com>
Subject: Re: [PATCH 1/2] input: Add Qualcomm PM8941 power key driver

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@...ymobile.com>
> > > 
> > > Signed-off-by: Courtney Cavin <courtney.cavin@...ymobile.com>
> > > Signed-off-by: Bjorn Andersson <bjorn.andersson@...ymobile.com>
> > > ---
> > >  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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ