lkml.org 
[lkml]   [2015]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] PM / sleep: prohibit devices probing during suspend/hibernation
On Thu, 8 Oct 2015, Grygorii Strashko wrote:

> >>>> @@ -277,9 +304,15 @@ static DECLARE_WAIT_QUEUE_HEAD(probe_waitqueue);
> >>>>
> >>>> static int really_probe(struct device *dev, struct device_driver *drv)
> >>>> {
> >>>> - int ret = 0;
> >>>> + int ret = -EPROBE_DEFER;
> >>>> int local_trigger_count = atomic_read(&deferred_trigger_count);
> >>>>
> >>>> + if (defer_all_probes) {
>
> Will it be ok If I add below comment here?
> /*
> * Value of defer_all_probes can be set only by
> * device_defer_all_probes_enable() which, in turn, will call
> * wait_for_device_probe() right after that to avoid any races.
> */

That will help. You could also add a comment where
wait_for_device_probe is called before device_defer_all_probes_enable,
explaining that is needed.

Alan Stern



\
 
 \ /
  Last update: 2015-10-08 22:21    [W:0.058 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site