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: <X/vv6ELcy+HodFGR@google.com>
Date:   Sun, 10 Jan 2021 22:27:52 -0800
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Tony Lindgren <tony@...mide.com>
Cc:     linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-omap@...r.kernel.org,
        Arthur Demchenkov <spinal.by@...il.com>,
        Carl Philipp Klemm <philipp@...s.xyz>,
        Merlijn Wajer <merlijn@...zup.org>,
        Pavel Machek <pavel@....cz>, ruleh <ruleh@....de>,
        Sebastian Reichel <sre@...nel.org>
Subject: Re: [PATCH 4/5] Input: omap4-keypad - use PM runtime autosuspend

On Mon, Jan 11, 2021 at 08:02:50AM +0200, Tony Lindgren wrote:
> * Tony Lindgren <tony@...mide.com> [210111 05:13]:
> > * Dmitry Torokhov <dmitry.torokhov@...il.com> [210111 05:01]:
> > > Hi Tony,
> > > 
> > > On Sun, Jan 10, 2021 at 09:05:28PM +0200, Tony Lindgren wrote:
> > > > @@ -350,15 +379,12 @@ static int omap4_keypad_probe(struct platform_device *pdev)
> > > >  
> > > >  	error = omap4_keypad_check_revision(&pdev->dev,
> > > >  					    keypad_data);
> > > > -	if (!error) {
> > > > -		/* Ensure device does not raise interrupts */
> > > > -		omap4_keypad_stop(keypad_data);
> > > > -	}
> > > > -
> > > > -	pm_runtime_put_sync(&pdev->dev);
> > > 
> > > Why are we moving this down? The idea was to make sure the power usage
> > > counters are correct even if we exit probe early.
> > 
> > Yes you are right, omap4_keypad_close() won't help with balancing the
> > get if we exit early.
> > 
> > > Can we call pm_runtime_mark_last_busy() and pm_runtime_put_autosuspend()
> > > here?
> > 
> > Yes that should work as there's no more register access during the probe.
> 
> Below is an updated version. I updated probe to use dev instead of
> &pdev->dev since we have it there. Does this look OK to you?

Yep, looks good, applied.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ