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]
Message-ID: <1321460414.1833.11.camel@anish-Inspiron-N5050>
Date:	Thu, 17 Nov 2011 01:20:14 +0900
From:	anish kumar <anish198519851985@...il.com>
To:	oskar.andero@...yericsson.com
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"jic23@....ac.uk" <jic23@....ac.uk>,
	"aghayal@...eaurora.org" <aghayal@...eaurora.org>,
	"Cavin, Courtney" <Courtney.Cavin@...yericsson.com>
Subject: Re: [PATCH v2] input: add driver support for Sharp gp2ap002a00f
 proximity sensor

On Wed, 2011-11-16 at 16:56 +0100, oskar.andero@...yericsson.com wrote:
> > > > > +#ifdef CONFIG_PM_SLEEP
> > > > > +static int gp2a_suspend(struct device *dev)
> > > > > +{
> > > > > +	struct i2c_client *client = to_i2c_client(dev);
> > > > > +	struct gp2a_data *dt = i2c_get_clientdata(client);
> > > > > +	int error;
> > > > > +
> > > > > +	if (device_may_wakeup(&client->dev)) {
> > > >  > +		enable_irq_wake(client->irq);
> > > > > +	} else {
> > > > 
> > > > This needs locking WRT open/close. Please acquire dt->device->mutex and
> > > > only disable if dt->device->users != 0. Similar shoudl be done for
> > > > resume.
> > > 
> > > I see what you mean. I will fix it. 
> > Is my understanding correct?You are going to disable the device 
> > only when there are users of the driver and not disable the device
> > otherwise.As anyway if there are no users the driver would have been
> > already disabled right?
> 
> Please, see PATCH v3 for the answer to your question.

Perhaps I didn't explain what I wanted to know.Can you kindly let me
know explain below statement by dmitry:
"This needs locking WRT open/close. Please acquire dt->device->mutex and
only disable if dt->device->users != 0. Similar shoudl be done for
resume"




--
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