26 Jul
2019
26 Jul
'19
9:11 p.m.
On Fri, Jul 26, 2019 at 08:25:35PM +0200, Guennadi Liakhovetski wrote:
On Fri, Jul 26, 2019 at 01:08:57PM -0500, Pierre-Louis Bossart wrote:
On 7/25/19 6:40 PM, Pierre-Louis Bossart wrote:
Not all platforms support runtime_pm for now, let's use runtime_pm only when enabled.
option2 (suggested by Jan Kotas): catch the -EACCESS error code
ret = pm_runtime_get_sync(slave->bus->dev);
- if (ret < 0)
- if (ret < 0 && ret != -EACCES) return ret;
Otherwise I'd go with (2), I think, since that's also the official purpose of the -EACCESS return code:
https://lists.linuxfoundation.org/pipermail/linux-pm/2011-June/031930.html
And at least we have examples in the kernel
drivers/gpu/drm/radeon/radeon_fb.c:57: if (ret < 0 && ret != -EACCES) {
--
With Best Regards,
Andy Shevchenko