[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190726191108.GE9224@smile.fi.intel.com>
Date: Fri, 26 Jul 2019 22:11:08 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Guennadi Liakhovetski <guennadi.liakhovetski@...ux.intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
alsa-devel@...a-project.org,
"Rafael J. Wysocki" <rafael@...nel.org>, tiwai@...e.de,
gregkh@...uxfoundation.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, vkoul@...nel.org, broonie@...nel.org,
srinivas.kandagatla@...aro.org, jank@...ence.com,
slawomir.blauciak@...el.com, Sanyog Kale <sanyog.r.kale@...el.com>
Subject: Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use
runtime_pm_get_sync/pm when enabled
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
Powered by blists - more mailing lists