diff options
| author | Ingo Molnar <mingo@kernel.org> | 2018-06-26 10:02:41 +0300 | 
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2018-06-26 10:02:41 +0300 | 
| commit | f446474889c06883a3879faa0896e2359e812a6b (patch) | |
| tree | 95634685d56dd532d1e9b73fbd07ca389296911b /drivers/base/core.c | |
| parent | 01bdee64f9cf8e15f998bf52789ed9d0ebdfa621 (diff) | |
| parent | 6f0d349d922ba44e4348a17a78ea51b7135965b1 (diff) | |
| download | linux-f446474889c06883a3879faa0896e2359e812a6b.tar.xz | |
Merge branch 'linus' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/base/core.c')
| -rw-r--r-- | drivers/base/core.c | 15 | 
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 36622b52e419..df3e1a44707a 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -236,6 +236,13 @@ struct device_link *device_link_add(struct device *consumer,  			link->rpm_active = true;  		}  		pm_runtime_new_link(consumer); +		/* +		 * If the link is being added by the consumer driver at probe +		 * time, balance the decrementation of the supplier's runtime PM +		 * usage counter after consumer probe in driver_probe_device(). +		 */ +		if (consumer->links.status == DL_DEV_PROBING) +			pm_runtime_get_noresume(supplier);  	}  	get_device(supplier);  	link->supplier = supplier; @@ -255,12 +262,12 @@ struct device_link *device_link_add(struct device *consumer,  			switch (consumer->links.status) {  			case DL_DEV_PROBING:  				/* -				 * Balance the decrementation of the supplier's -				 * runtime PM usage counter after consumer probe -				 * in driver_probe_device(). +				 * Some callers expect the link creation during +				 * consumer driver probe to resume the supplier +				 * even without DL_FLAG_RPM_ACTIVE.  				 */  				if (flags & DL_FLAG_PM_RUNTIME) -					pm_runtime_get_sync(supplier); +					pm_runtime_resume(supplier);  				link->status = DL_STATE_CONSUMER_PROBE;  				break;  | 
